|
This thread is locked; no one can reply to it. |
1
2
|
Allegro 5.1 problem with PNG (possible bug confirmed). |
AMCerasoli
Member #11,955
May 2010
|
The thing is that I'm 80% sure that I compiled Allegro 5.0.4 without libPNG, and worked fine... So at least that there is a bug with something new, that shouldn't be the problem. In the other hand, I have this new PC, and I haven't tried to compile A5.1 in the old one... So it could be possible.
|
SiegeLord
Member #7,827
October 2006
|
AMCerasoli said: This problem has nothing to do with the code... I could give you a very simple code, but isn't necessary, the examples and other games that compile fine on your PC, doesn't work on mine... So code here is useless. The code is so that the people have something simple to try to reproduce your problem. Also, by writing the code, you'll see if it's your fault or Allegro's. Either way, the simple code is useful for everyone. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Oscar Giner
Member #2,207
April 2002
|
GDI+ is linked dynamically, so the version you have depends on your OS, and if it's upgraded. -- |
AMCerasoli
Member #11,955
May 2010
|
SiegeLord said: The code is so that the people have something simple to try to reproduce your problem. Also, by writing the code, you'll see if it's your fault or Allegro's. Either way, the simple code is useful for everyone. Here you go... 1
2int main(){
3
4 al_init();
5 al_init_image_addon();
6
7 ALLEGRO_DISPLAY *disp = al_create_display(800,600);
8 ALLEGRO_BITMAP *bmp = al_load_bitmap("bmp.png");
9
10 al_draw_bitmap(bmp,200,200,0);
11
12 al_flip_display();
13 al_rest(2);
14
15 al_destroy_display(disp);
16 al_destroy_bitmap(bmp);
17
18 return 0;
19}
Oscar Giner said: GDI+ is linked dynamically, so the version you have depends on your OS, and if it's upgraded. GDI+ comes with MinGW, and for what I see it's a static link. I'm talking about Windows.
|
Trent Gamblin
Member #261
April 2000
|
GDI+ is part of Windows. What comes with MinGW is headers and an import library.
|
AMCerasoli
Member #11,955
May 2010
|
In MinGW I have a gdiplus.h header (along with others) but also a gdiplus.a library, which is where Cmake is linking to. If I modify the gdiplus file that comes with MinGW then it finds GdiPlus.dll that comes with Windows. So what I'm linking?
|
Elias
Member #358
May 2000
|
AMCerasoli said: Here you go... Can you attach the image with which it happens? -- |
AMCerasoli
Member #11,955
May 2010
|
Yes I can, tell me of which size would you like it?.
|
Elias
Member #358
May 2000
|
Doesn't matter, just anything to reproduce it. -- |
AMCerasoli
Member #11,955
May 2010
|
{"name":"605054","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/e\/5e49a8c10ad7e76c1a639c2498c6265c.png","w":314,"h":274,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/e\/5e49a8c10ad7e76c1a639c2498c6265c"} In case you forgot it, Haiku and Skate images didn't work neither.
|
Elias
Member #358
May 2000
|
Yes, but if everyone uses another image it's more confusing. And since this does seem to be hard to reproduce it's better to avoid anything which makes it harder/more confusing to test. Now we have a simple test file (you should edit it to add the two missing includes) we can compare. Here it looks like this: {"name":"605055","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/c\/fc318a7ee00dc55257d9ae6dad9fc6bc.png","w":802,"h":626,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/c\/fc318a7ee00dc55257d9ae6dad9fc6bc"} [edit:] It should be fixed in SVN now: https://github.com/elias-pschernig/allegro5/commit/961848657e3d256857fca2ee6fbab6a17915c598 -- |
Peter Wang
Member #23
April 2000
|
Can you add a test case?
|
Elias
Member #358
May 2000
|
I don't think it's possible to force the libpng/GDI+ loaders at runtime. Other than that the current test cases would have catched it already I believe, just nobody ever was running them with GDI+. -- |
Peter Wang
Member #23
April 2000
|
I see. I do run the tests on Windows, but only on the 5.0 branch just before a release. Any chance you could set up your daily tests to run under Wine as well? Allegro 5 works pretty well with Wine, though maybe not with a virtual X server.
|
Elias
Member #358
May 2000
|
Hm, shouldn't be all that hard to set it up to run all combinations of opengl/directx/libpng/gdi+ I guess. My tests run on a system with only 512MB and very limited disk space though so I'm not sure if I can run (or even install) Wine :/ -- |
kenmasters1976
Member #8,794
July 2007
|
So there was actually a bug? I see it was about premultiplied alpha. How come none of us was able to reproduce it even when building Allegro with GDI+?.
|
Elias
Member #358
May 2000
|
You needed special images like that palm leaf above to clearly see it. It had some hidden things in the color channels where alpha was 0. I only was able to fix it after analyzing it in GIMP and figuring out what exactly the problem must be (thanks again for posting it AMCerasoli). With "normal" images likely only the color of anti-aliased parts changed slightly. -- |
|
1
2
|