June 14, 2024, 02:00:10 AM


IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!

DevIL Image Library

Started by Brian, July 26, 2021, 06:25:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I don't know if anyone knows anything about the DevIL image library, but I am desperately trying to get it to show a GIF that has transparent pixels
Run the code, and it displays the GIF. Select Rotate from the menu, and it rotates OK. But neither views show the background as transparent
Any ideas?



I've used it before but it's been a while. If someone else doesn't look into it for you I will after I get through dealing with my wife's funeral.
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library


No rush, Larry - you do what you have to do. I know I can load GIFs in IWB, but it's the rotate feature I am after



I simply had to try your code, Brian.
There is something strange with your example.

First, I renamed your GIF so the compiled program did not find it,
The result was a checkered rectangle much less in size than your GIF. When trying to rotate it, it was rotaded anticlockwise.

Then, I gave your GIF the original name, resulting in clockwise rotation, but no transparency.

At last I edited your GIF, and gave it the same background color as the window RGB(219,219,219).
This make the rotated GIF appear as it has transparent background, but of course it is only an illusion.
But if rotated more than 45 degrees, the "transparency" seems to dissapear.

I have not yet found a user manual for the DevIL library, but wonder if you may have a memory allocation problem?

Support Amateur Radio  -  Have a ham  for dinner!


Hi, Egil,

The chequered image is built in to the image library, and will be shown in response to various error conditions

I could paint the background with RGB 219, etc, myself and, indeed, have already done so. But the idea is to have a transparent background so that the loaded image can move over other images, and show those images through the transparency

I have also had angle errors. I think it depends on what type of image you are loading - bitmaps seem to be different than GIF images in order of how they are rotated

I found a site that lists all the commands, which was handy:

Anyway, it keeps the grey matter ticking over!