Hi
Did GFL SDK work with RAW image ?
GFL SDK and Nikon RAW Format (NEF D200 Body Camera)
Moderators: XnTriq, helmut, xnview
-
- Posts: 8
- Joined: Mon Mar 22, 2010 11:23 am
-
- Author of XnView
- Posts: 44490
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Posts: 8
- Joined: Mon Mar 22, 2010 11:23 am
Re: GFL SDK and Nikon RAW Format (NEF D200 Body Camera)
I'v look GflSDK.20100321 (in http://newsgroup.xnview.com/viewtopic.p ... 530#p83064), compil the DPR with Delphi7 and opening Nikon D200 NEF file i get error likexnview wrote:Yes, why?
FR - "Opération en virgule flottante incorrecte"
EN - "Floating-point operation error"
No pb with Nikon jpeg file format.
I need help for opening Nikon RAW format
-
- Author of XnView
- Posts: 44490
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: GFL SDK and Nikon RAW Format (NEF D200 Body Camera)
Could you send me the RAW file to test?
Pierre.
-
- Posts: 33
- Joined: Tue Mar 09, 2010 6:40 pm
Re: GFL SDK and Nikon RAW Format (NEF D200 Body Camera)
Now I also have something similar:
- I open a jpeg-file with gflLoadBitmap() with no problems at all,
- can assign that to be displayed and also read dimensions, format... everything.
- When calling gflBitmapHasEXIF() it gives GFL_TRUE, so my next call is:
- gflBitmapGetEXIF() - and while calling this an exception of type EOverflow occurs: "Floating point overflow".
- GFL does not have to be re-initialized to load another image. Only the image's EXIF-data is causing this error and luckily not affecting any main handle of the image itself.
-
- Posts: 33
- Joined: Tue Mar 09, 2010 6:40 pm
Re: GFL SDK and Nikon RAW Format (NEF D200 Body Camera)
I found a cure - and there are at least two things which cause this misbehaviour:
The topics I found on the net were http://www.pascalgamedevelopment.com/fo ... 845.0;wap2 and http://www.ghisler.ch/board/viewtopic.p ... 775#180775 and http://books.google.com/books?id=Wu4hhG ... &q&f=false. The third one is from a book, where an example is very well pictured:
The problem here is: EDivByZero only occurs if both dividend and divisor are integers. As soon as one of them is a floating point number an exception EInvalidOp ("invalid floating point operation") will occur:
- Delphi turns ON floating point division errors, while Visual or Borland C++ turns them OFF. I suspect Pierre compiles the DLLs with some C++ compiler. This is the reason why we have a different behaviour between Delphi and (all?) others.
- When loading the .NEF-files there does occur a division by zero somewhere - but due to the compiler settings those have been silently ignored all the time! Do we really want this?
The topics I found on the net were http://www.pascalgamedevelopment.com/fo ... 845.0;wap2 and http://www.ghisler.ch/board/viewtopic.p ... 775#180775 and http://books.google.com/books?id=Wu4hhG ... &q&f=false. The third one is from a book, where an example is very well pictured:
The problem here is: EDivByZero only occurs if both dividend and divisor are integers. As soon as one of them is a floating point number an exception EInvalidOp ("invalid floating point operation") will occur:
So Pierre - while my approach is only a workaround - could you please trace down the division by zero error? I'm very sure it occurs somewhere. You should also see it immediatly when adjusting the compiler settings likewise...0 / 0 = EDivByZero
0.0 / 0 = EInvalidOp
0 / 0.0 = EInvalidOp
0.0 / 0.0 = EInvalidOp
You do not have the required permissions to view the files attached to this post.
-
- Posts: 8
- Joined: Mon Mar 22, 2010 11:23 am
Re: GFL SDK and Nikon RAW Format (NEF D200 Body Camera)
AmigoJack
Thank's for help, this work good.
Thank's for help, this work good.
-
- Posts: 33
- Joined: Tue Mar 09, 2010 6:40 pm
Re: GFL SDK and Nikon RAW Format (NEF D200 Body Camera)
I was asked how to revert from calling my MungeFPCW() function back to the state it was before - it should be as easy as
Code: Select all
asm
fldcw pwOldCW
end;