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

Latest version of Lazarus breaks Vampyre :(

Started by jdarling, 24 October 2007, 20:35:00

Previous topic - Next topic

jdarling

I just downloaded the latest snapshot of Lazarus only to find that it completely breaks when you try and install Vampyre.  The problem is that they (unannounced to anyone) have deprecated and removed CreateBitmapFromRawImage and a few others.

The fix is to open ImagingComponents and edit the following lines:
Change if CreateBitmapFromRawImage(RawImage, ImgHandle, ImgMaskHandle, False) then
toif RawImage_CreateBitmaps(RawImage, ImgHandle, ImgMaskHandle, false) then
and Changeif GetBitmapRawImageDescription(Bitmap.Handle, @RawImage.Description) then
toif RawImage_DescriptionFromBitmap(Bitmap.Handle, RawImage.Description) then
and Changeif GetRawImageFromBitmap(Bitmap.Handle, 0, Classes.Rect(0, 0, Data.Width, Data.Height), RawImage) then
toif RawImage_FromBitmap(RawImage, Bitmap.Handle, 0, Classes.Rect(0, 0, Data.Width, Data.Height)) then
and FINALLY ChangeFreeRawImageData(@RawImage);
toRawImage.FreeData;

Just thought others might want to know about this so that the next time you update you don't have to do the leg work yourself :).

Galfar

This Lazarus problem was already reported, but thanks anyway:
http://galfar.vevb.net/imaging/smf/index.php/topic,42.0.html
There should be comments how to get it working with new Laz
in SVN code.

I just hope they release Laz 0.9.24 soon. Until that time I have to
keep the old RawImage code active because I think that most people
use Laz 0.9.22. Or do you happen to know a way how to detect
Laz version during compile time? This would help a lot.


jdarling

I don't know how to detect the lazarus version at compile time, but some place I was reading about performing an {$IFDEF ProcName} or something similar.  I'll take a look around and see if I can find it.

I noticed the thread after you pointed it out, but the title threw me and didn't notice it when I was looking for a fix.

Galfar

Lararus 0.9.24 is finally out so the new RawImage API is now used as default by Imaging.

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

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

SMF spam blocked by CleanTalk