06-04-2025, 05:05 PM
(06-04-2025, 04:56 PM)a740g Wrote: @ahenry3068, I completely agree. Shelling out to run external programs can be quite slow. Another problem is that it is not portable and introduces dependencies into your program.
I noticed that ImageMagick has the ImageWand and ImageCore C APIs. If you create a QB64 wrapper or use DECLARE LIBRARY directly, you should get improved performance in your code.
I need to get from the 24 bit PNG file to an 8 bit pixel array and a 24(32) bit palette I can then transform into Bitmap and palette information for the Commander X16. I also have to be able to arbitrarily resize each image in going from the PNG to the 8 bit array. I'm currently creating that from a Windows BMP rev 3 which I use ImageMagick to produce. Another tack I could take is to have ffmpeg extract BMP files INSTEAD of PNG's but that could take a Huge amount of extra disk space and I don't currently know how to make FFMPEG produce the revision of the Windows BMP standard that my code understands.