Currently in my program I am loading a handful of images as BitMapObject. Is it possible to use NewDTObject() to "load" it and scale it, keeping the original in tact?
dto = NewDTObject(NULL, DTA_SourceType, DTST_MEMORY, DTA_SourceAddress, Object[IMG_IMAGE1], DTA_SourceSize, sizeof(Object[IMG_IMAGE1]), DTA_GroupID, GID_PICTURE, PDTA_DestMode, PMODE_V43, TAG_DONE);
Then do some scaling on the new object.
That is not correct; just showing as an example of what I am wanting to do.
The images get used dozens of times. I don't want to have to keep reloading them over and over.
@mritter0
I used datatypes to load an image and then IGraphics->CompositeTags() to scale it. Loaded and scaled are distinct images.
Have a look at my image viewer HottiesView available from OS4 Depot, file HottiesView.c, LoadImageARGB32() and ScaleImage() methods.
Nice. Best example code I have seen. I have an idea on how to do what I envisioned.
Thanks!
I used your p96 bits of code to load and scale (CompositeTags()). All is working the way I hoped. EXCEPT....none of the images have the transparency shown correctly; all have black backgrounds instead. I am using the main image code, not the thumbnail code.
I am on OS4.1FE using WinUAE so not a real 32bit video card. Is that all the problem is, or is there something more I need for the transparency? ReAction BitMap objects handle the transparency correctly.
Thanks for the code. It really helped.
@mritter0
Well I don' t know exactly what you are doing and how. My source code uses IGraphics->CompositeTags() to make the transparency effect, search for "Blitting with alpha blend" comments.
OS4 emulated is not officially supported and I heard the current emulation has some limitations (128 MB RAM, 4 MB GFX RAM, no compositing, no overlay, no 3D).
You are welcome.
Sorry. Not transparency like you are doing with the thumbnail image. Alpha channel transparency for the background. They all show with black backgrounds for PNGs. I tried several different options but can't get it to work right.