Over time I've made various programs to convert certain graphics formats into a usable form (i.e. PNG). The two most recent examples were for
GXT and
PNGB/TGAB. I've noticed that it's become a bit tedious, since the majority of the code is similar and I have to recompile every time I change anything. I used to do this with archives as well, but since I started using QuickBMS a while ago it's made it much quicker and easier to extract them (and sharing the script is also easier). So I thought, "why not have a program like QuickBMS but for converting graphics?"
Therefore I am considering making something like this. That way you can make converters for complex graphic files which graphics viewers such as TiledGGD cannot handle easily (or at all). This would be especially useful for formats that may have images displayed in chunks.
An example script may be something like this:
Code:
get SIZE long
get WIDTH short
get HEIGHT short
savepos OFFSET
setformat ARGB32 #this means the pixel data is read as 32-bit ARGB
readpxls IMG OFFSET SIZE WIDTH HEIGHT #stores the image data into an object called IMG
save IMG "myImg.png"
This is just a simple example of how the scripts might work, you can probably figure out what it would do. I would allow custom pixel formats, but there would be presets for common formats like ARGB32. You could do additional things to IMG before saving such as flipping or combining with other images to form a bigger image (I have seen some formats that store images in parts). However as you can see things like reading numbers would be similar to QuickBMS, this would make it relatively easy to learn for people who already use QuickBMS.
I just want to know, do you guys think this is a good idea, and would you find it useful? I think it's good and I would personally use it but it would be nice to have some input and opinions. Suggestions are also welcome
