• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 
22 November 2024, 07:21:39

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - eny

1
Had some time to work on my Photo mgmt application and it would be nice if retrieving EXIF data would be possible.
Can this be done with the VIL?
I saw EXIF mentioned somewhere in source comments but I'm not sure if it's operational.

<<Edit>>
Nevermind; built an EXIF parser myself.
Specs are pretty straightforward.
2
I've found a surprisinlgy simple workaround for this problem.
It seems the compiler is confused by the TLongWordRec usage in SwapEndianLongWord (ImagingUtility.pas) together with a call to this function with a pure constant value parameter:
      LongVal := SwapEndianLongWord(16);               // Extra data size (4 (mask size) + 4 (ranges size) + 8 (name))

It's perfectly good syntax, but the compiler gets confused and raises an internal error.

I've found 2 different ways of implementing a quick fix that both work (as far as I can see):
1. Create a simple variant record type and use that as a typecast instead of TLongWordRec.
TSimpleLWRec = packed record
  B0, B1, B2, B3: byte;
end;
...
  // In SwapEndianLongWord:
  TSimpleLWRec(Result).B0 = TSimpleLWRec(Value).B3;
  TSimpleLWRec(Result).B1 = TSimpleLWRec(Value).B2;
  //etc...


2. Cheat on the compiler by not passing '16' as an argument, but use a local variable instead:
      LongVal := 16;
      LongVal := SwapEndianLongWord(LongVal);               // Extra data size (4 (mask size) + 4 (ranges size) + 8 (name))

LongVal is already there and the assignment introduces little overhead.
3
VIL 264; lazarus daily snapshot 26788 (July 23rd) with FPC 2.4.3 on WinXP SP3.
When adding some units to the uses list (Imaging, ImagingTypes, ImagingClasses, ImagingCanvases) an internal error is raised on line 705 of ImagingPSD.
SMF spam blocked by CleanTalk