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).
Jpeg decoder failed
Moderator: Moderators
Re: Jpeg decoder failed
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.
K
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.
K
Re: Jpeg decoder failed
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).
Maybe the error message should be more specific (or link to this thread).
Re: Jpeg decoder failed
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).
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.
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.