corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kelly <>
Subject Re: JPEG in Linux -ERROR
Date Wed, 15 Apr 2015 16:47:29 GMT
> On 14 Apr 2015, at 9:44 pm, Artur Teixeira <> wrote:
> Good Afternoon,
> I'd greatly appreciate if you can help me with an issue im having with the
> dfconvert.
> When i execute the OS X version "dfconvert create to.docx from.html" there
> is no problem.
> BUT if i execute the same code with the same files in LINUX the .jpeg gives
> out this information:
>> Could not get aspect ratio of image: Unsupported image format
> Is this normal? The linux version isn't prepared for this yet? Is there a
> simple solution out there?
> I couldn't find a good answer for this online.

It should work - this sounds like a bug. Would you be able to email me a copy of the document?
It might be something unique/different about that document in comparison to the others I’ve
tested with.

The way we get image dimensions differs between platforms. On OS X and iOS we use Apple’s
ImageIO framework, which is bundled with the OS. On Linux and Windows we use SDL_image. There
is a function called DFGetImageDimensions which has different implementations for each platform;
this would be the place to look if you want to have a go at debugging it yourself (see DocFormats/platform/src/Linux.c).

> P.S. I don't know if it helps but, the conversion of the .docx with jpeg
> files to .html (and "images" folder) has no problem either in LINUX or OS
> X, with or without JPEG.

Yeah we don’t actually need to get the image dimensions/aspect ratio when going the other
way - docx stores both the width and height of the image within the XML content of the document
itself, so we can derive the aspect ratio from that automatically. It’s only in the case
of HTML where image sizes can be expressed by width only (our editing code sets width=“X%”,
that is a percentage of page width, and leaves height unspecified).

Dr Peter M. Kelly

PGP key: <>
(fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message