Jpeg decoder failed

Found a bug? Post information about it here so we can fix it!

Moderator: Moderators

User avatar
rrTea
Posts: 292
Joined: Sat Feb 15, 2014 9:54 am

Jpeg decoder failed

Postby rrTea » Thu Nov 12, 2015 9:59 am

I'm trying to import some images in jpg format by directly drag and dropping them into the IDE, but it just turns out blank and a "Jpeg decoder failed." message pops up in the console. Pngs work as expected (no error and ZGE automatically generates all the components in the Project Tree).

Not a big deal for me since I never use jpgs at all but since I bumpred into it I thought I might as well report it.

Edit: actually I can't import jpgs even if I manually create all the components and try to import the image from the BitmapFromFile / Import... (here, too, pngs work no problem).
Super Heli (sketch for a shooter)
YY Slider (polarity based puzzle)

User avatar
Kjell
Posts: 1609
Joined: Sat Feb 23, 2008 11:15 pm

Re: Jpeg decoder failed

Postby Kjell » Thu Nov 12, 2015 11:44 am

Hi rrTea,

Only Baseline ("Standard") and Baseline Optimized JPGs are supported, Progressive Scan* JPGs are not. So, make sure your JPGs use a supported format.

*Progressive Scan used to be particularly useful for the web back in the 14.4k days, as you could see the image going from super pixelated to the final image ( see demo below ) while it's being (down)loaded. But that's not really relevant for ZGE, hence it not being supported.

Image

K

User avatar
rrTea
Posts: 292
Joined: Sat Feb 15, 2014 9:54 am

Re: Jpeg decoder failed

Postby rrTea » Fri Nov 13, 2015 12:45 am

Oh indeed, that's the case - it just so happened that all the jpgs I tried were saved in the unsupported format.

Maybe the error message should be more specific (or link to this thread).
Super Heli (sketch for a shooter)
YY Slider (polarity based puzzle)

User avatar
rrTea
Posts: 292
Joined: Sat Feb 15, 2014 9:54 am

Re: Jpeg decoder failed

Postby rrTea » Sun May 22, 2016 9:18 am

I tried working with jpgs again and I checked whether the images are saved using Progressive Scan - and no, they aren't but still fail to work properly when re-imported into an existing Bitmap / BitmapFromFile (of identical dimensions).
剪贴板图片 (19).png
Sometimes the top is garbled, sometimes the whole image etc
剪贴板图片 (19).png (151.81 KiB) Viewed 891 times


Confusingly, drag and dropping the same jpg into the Project Tree works. Surely if the image is in an unsupported format both methods would fail (or the other way around, if the image is acceptable it should work in both cases)? And the same image works perfectly in a fresh project regardless of the method used.

Just to make sure I tried to save the jpgs with all possible permutations of options that Photoshop offers when saving a jpg (including going through Save for Web) - none of the resulting files can be imported into an existing bitmap. Trying to convert a png to jpg using other tools other than Photoshop also gives the same garbled result once reimported.

In the end I deleted the old BitmapFromFile, made a new one, imported the image and voila' it works.


Return to “Bug reports”

Who is online

Users browsing this forum: No registered users and 2 guests