Error: (5038) identifier idents no member "Init_BPP32_R8G8B8_BIO_TTB"
Free cross-platform image editor
Brought to you by:
circular17
When compiling bgrabitmap 8.7 with qt4 support (--widgetset=qt argument to lazbuild) it causes following error:
/tmp/lazpaint-qt4/src/bgrabitmap8.7/bgraqtbitmap.pas(110,26) Error: (5038) identifier idents no member "Init_BPP32_R8G8B8_BIO_TTB"
$ lazbuild --version
1.4.2
$ fpc
Free Pascal Compiler version 2.6.4 [2014/03/12] for x86_64
Anonymous
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Apparently something like this patch works:
The same patch, but stored in a file.
My environment is FPC 3.1.1 + Laz 1.7 Linux 64
Thanks for the patch. However I don't think I can apply as it is. Indeed if the alpha value is not set to 255, as a result a transparent image would be drawn. However this function is suppose to draw an opaque image.
Went into same problem. It won't compile against qt. Lazarus trunk still have no function BPP32_R8G8B8_BIO_TTB at the moment.
Not good with graphic stuff, but was thinking. Does 32 bit means additional bits for alpha value? What about 24 bit? Does it mean it's always have alpha set to 255? Or am i understanding it wrong? There is a function Init_BPP24_R8G8B8_BIO_TTB.
Ended up with different thing
In uscaledpi
to
Ok applied change to uscaledpi.
Regarding DataDrawOpaque function, would it work to just remove the function DataDrawOpaque from BGRAQtBitmap unit? Indeed the function is already defined in the base class to use RGB/BGR format.
I think that isn't a BGRABitmap bug, but a Lazarus QT bug? I reported this thinking that TRawImage is a BGRABitmap class, instead it is a Lazarus class.
Last edit: Fabio Luis Girardi 2016-08-01
It is not really a bug of TRawImage in the sense that it is not necessarily providing all possible initialisers. We could instead initialise manually with the adequate values. But before trying that, can you try to remove the DataDrawOpaque function, it is just an override, so the base class function will be used instead, and it may work just fine. To check it, just draw a TBGRABitmap on a canvas using the TBGRABitmap.Draw function with the Opaque parameter set to True. It would be helpful for me if you could try it.
I'll do that.
Something like this? Testing it and everything appears to be ok
It wasn't all. Looks like it went to compile using precompiled unit 24bit function. With clean compile got error again. So changed if to ifdef
to
{$IFDEF LCLWin32} still should be there in uscaledpi
clean compiled several times against win32, gtk2 and qt4. went without a hitch.
http://i.imgur.com/d9vKFqC.gif
further talking about uscaledpi i might suggest this
to
seem to work on win32, qt and gtk2 on windows.
GetTextHeight('Hg') seem resets size to default or doing something similar. so if an app has some label with big text it will be resized to small size.
http://i.imgur.com/RvbaRZb.gif
Last edit: user01 2016-08-01
@fabio: for now I have removed on Git the function in BGRAQtBitmap.
If we change the function in BGRALCLBitmap with the following, would that still work?
Here is a test program to check speed:
http://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=33530.0;attach=16095
The test is returning a number between 10-20ms/100 shapes? Is a bad number?
10-20 ms is ok. I guess we can validate the change.
11-12ms / 100 shapes with -O4, without debugging symbols and running outside lazarus
The screen output.
Thanks very much. That seems wonderful to me.