• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Post reply

Other options

Shortcuts: ALT+S save/post or ALT+P preview

Topic summary

Posted by Galfar
 - 27 August 2008, 11:04:21
Your solution is ok.
You could also call RawImage_FromBitmap with nil as value of PRect parameter, it internally
creates Rect to encompass the whole image.
Posted by mos
 - 27 August 2008, 09:37:30
For this last error I have resolved on this way (see red lines):

[...cut...]
{$IFDEF COMPONENT_SET_LCL}
  // Get raw image from bitmap (mask handle must be 0 or expect violations)
  { If you get complitation error here upgrade to Lazarus 0.9.24+ }
  aRect := Classes.Rect(0, 0, Data.Width, Data.Height);
  if RawImage_FromBitmap(RawImage, Bitmap.Handle, 0, @aRect) then

  begin
    LineLazBytes := GetBytesPerLine(Data.Width, RawImage.Description.BitsPerPixel,
      RawImage.Description.LineEnd);
[...cut...]

with aRect of TRect type, now I compile with success.

There's a better solution?


Bye

Posted by mos
 - 27 August 2008, 09:24:36
Thankyou for your answer, I have fixed it, but I have another error:

E:\SVILUPPO\Imaging\Source\ImagingComponents.pas(728,97) Error: Incompatible type for arg no. 4: Got "RECT", expected "PRect"

Source code of ImagingComponents.pas line 728 (red line):

[...cut...]
{$IFDEF COMPONENT_SET_LCL}
  // Get raw image from bitmap (mask handle must be 0 or expect violations)
  { If you get complitation error here upgrade to Lazarus 0.9.24+ }
  if RawImage_FromBitmap(RawImage, Bitmap.Handle, 0, Classes.Rect(0, 0, Data.Width, Data.Height)) then
  begin
    LineLazBytes := GetBytesPerLine(Data.Width, RawImage.Description.BitsPerPixel,
      RawImage.Description.LineEnd);
[...cut...]

Can you help me on this?


Bye


Posted by Galfar
 - 26 August 2008, 22:44:20
Looks like they changed GetDefaultMimeType to GetMimeType in Laz 0.9.25.
Just rename the method to GetMimeType and it should work.
Posted by mos
 - 25 August 2008, 19:51:58
I compile the demo project \Imaging\Demos\ObjectPascal\LCLImager with Lazarus 0.9.25 under WinXPSP2 but I obtain the following error:

E:\SVILUPPO\Imaging\Source\ImagingComponents.pas(117,14) Error: There is no method in an ancestor class to be overridden: "TImagingGraphicForSave.GetDefaultMimeType:AnsiString"

Can you help me?


Goodbye & thanks
SMF spam blocked by CleanTalk