D.J.Peters wrote:Looks like ImageInfo doesn't allow optional arguments any more ?
Sort of. I did not make this change lightly and knew that it could cause some source code breaks.
imho, LONG data type should be preferred since the FB.IMAGE type which directly represents the underlying implementation in gfxlib all LONG types.
The IMAGEINFO function (which existed before fbc's 64-bit capability) is not great to work with. Using INTEGER probably seemed like the best compromise at the time since a lot of code then was using INTEGER data type.
Short answer is, use LONG data type with IMAGEINFO and it works same on both 32-bit and 64-bit.
IMAGEINFO(img, width, height, bpp, pitch, imgdata, size ) is kind of weird in that all parameters are optional. This would be fine if all the datatypes were the same, but imgdata is an ANY PTR and will causes problems with overload resolution unless at least one other parameter is made mandatory.
Anyway, in 1.08.0 to allow LONG (preferred, and all parameters are optional), but also also LONGINT and INTEGER if desired at least one parameter other than imgdata had to be made mandatory (non-optional), and I choose width and height.
----
But, if you want the old gfx IMAGEINFO API back (to ease the pain):
Code: Select all
#if __FB_VERSION__ = "1.08.0"
extern "rtlib"
#undef IMAGEINFO
#undef IMAGEINFO
declare function IMAGEINFO alias "fb_GfxImageInfo" _
( _
byval img as any ptr, _
byref w as integer = 0, _
byref h as integer = 0, _
byref bpp as integer = 0, _
byref pitch as integer = 0, _
byref imagedata as any ptr = 0, _
byref size as integer = 0 _
) as long
end extern
#endif