ImageFileConvert_MiscOp in JPEGs
- From: Martin Bazley <martin.bazley@xxxxxxxxxxxxxxxx>
- Date: Wed, 07 Apr 2010 11:54:03 +0100
I am in the process of updating a program which requires knowledge of
the width, height, x and y DPIs of images of arbitrary filetypes (you
can all probably guess which one). ImageFileConvert_MiscOp does not
appear to do what it says it should.
According to the documentation, where the output type is a sprite the
operation type code &400 (passed in R4) is reserved for the reading of
such information. There are no flag bits (R0) mentioned anywhere.
When reading a 90x90 DPI PNG via this mechanism (R1=&0B600FF9), it works
and the image properties are returned in R0 to R5 as advertised. No
such luck with a 150x150 DPI JPEG, which returns an error to the effect
of 'Bad flags for conversion'. There is, as previously mentioned, no
documentation relating to the flags anywhere, so I have passed R0=0 in
Can anyone confirm if there are flags which need to be set, if it's a
bug in ImageFileConvert specific to JPEGs, or if it's a bug in
ImageFileConvert specific to non-standard DPIs?
RISC OS 4.39.
/ _ _ \ I don't have a problem with God; it's his fan club I can't stand.
( ( |_| ) )
\_> <_/ ======================= Martin Bazley ==========================