ChangeFSI PNG output
Andrew Rawnsley (492) 1443 posts |
Hi folks, I notice that !ChangeFSI is receiving some updates again as I write this. One of my pet peeves with CFSI is that whilst JPEG output is possible as well as sprite, there’s no (current) lossless export format that isn’t RISC OS specific. TIFF or PNG would fit the bill, but PNG probably makes the most sense long term as it seems to have become a prevalent lossless format with a fair amount of flexibility. If !Paint is then made aware of !ChangeFSI, we’d actually have quite a good import/export setup for loading/saving in cross-platform formats. Whilst it may touch a sensitive nerve, this is one area where OS5 lags behind OS4.39, to the point where I tend to do that kind of work on VA rather than OS5. Whilst I’m writing, if there’s any way mask/alpha info could be preserved, it’d be a huge boon, as the loss of mask info when processing an icon with CFSI is always a huge annoyance. |
Chris Hall (132) 3554 posts |
!Paint under Virtual Risc PC offers JPEG, Sprite or PNG as the output format. !ImgMaster (!DPlgScan) offers an option to change the colour format. |
Krzysztof Staniorowski (2787) 35 posts |
Still, it would be nice to have .png support in !ChangeFSI. |
Jon Abbott (1421) 2641 posts |
It would be nice of RO5 supported PNG in general, such as importing a PNG into a Sprite via an OS_SpriteOp or exporting from a Sprite to a PNG file etc. I’ll admit, I’ve not looked into what the current state of PNG support in the OS is, but I think I’m correct in assuming there is none. IIRC RO6 had support, so I don’t know if there’s an option to port that across or if it needs coding from scratch. RO6’s implementation may not even cover all of the PNG standard, as it’s fairly modular with optional blocks that can be included but ignored depending on the requirements. PNG support is something that could be widely impacting, web browsers being the obvious candidate. Alpha support would certainly be good as well. |
Michael Emerton (483) 136 posts |
Adjust’s PNG > !Paint > Sprite was the method I originally used to create alpha transparent sprites. Even just having that back would be nice :@) |
Steve Pampling (1551) 8155 posts |
I think you could reliably say that recode from scratch is a more viable1 option. 1 I don’t think discussing the alternative is likely to be useful or productive of community harmony. |
Jon Abbott (1421) 2641 posts |
Importing a linux port would probably be the route to take. |
Steffen Huber (91) 1949 posts |
libpng is a plain ANSI C implementation, and the reference implementation. And has a suitable licence. As a special bonus, it also contains code by Kevin Bracey. |
Bryan Hogan (339) 589 posts |
Or duplicate RO Select’s Image File Render/Convert API, then plugins for many formats could be added as required. |
David Feugey (2125) 2709 posts |
Some plugin system (for FS, images, etc.) is really a good idea to get more contributions. |
Jon Abbott (1421) 2641 posts |
Sounds sensible |
Richard Walker (2090) 431 posts |
I guess step 1 is to review the RO6 API (it is all online). If it seems reasonable then it can be copied. No point in devising an API if someone else did it, and it was used (although only a bit). |