GLBasic forum

Main forum => Bug Reports => Topic started by: ampos on 2011-Sep-10

Title: JPEG not working on shoebox
Post by: ampos on 2011-Sep-10
If a jpg file is inside a shoebox, it does not load.

Code (glbasic) Select
loadbmp "background.jpg"

did not work. Don't know if it is because the jpg does not load from a shoebox or if the shoebox tool does not "copy" the jpg file inside the shoebox.

Also,

Code (glbasic) Select
savebmp "back.jpg"

saves a wrong file (bad colors)
Title: Re: JPEG not working on shoebox
Post by: Crivens on 2011-Sep-10
Yeah I never use jpgs. Would be ideal for backgrounds but I've had loads of problems in GLB from loading causing freezes to complete program shutdowns. And yeah when I used my resize routine on them I got weird colouring when it saved the file. Ie just avoid them for now.

Cheers
Title: Re: JPEG not working on shoebox
Post by: MrTAToad on 2011-Sep-10
Yes, I mentioned JPEGs inside Shoebox files a while ago - Gernot said that it wasn't possible to fix...

Using JPEG's should be no problem, although the colouring problem could be to do with with lossy format it uses...
Title: Re: JPEG not working on shoebox
Post by: Kitty Hello on 2011-Sep-12
It should be possible with a stupid hack. I had not time to do that, yet.
Title: Re: JPEG not working on shoebox
Post by: Ian Price on 2016-Sep-04
It's been a very long time, but any chance of fixing .JPG files in Shoebox?
Title: Re: JPEG not working on shoebox
Post by: Kitty Hello on 2016-Sep-04
As a hack: openfile, read and write to a temp file.
Title: Re: JPEG not working on shoebox
Post by: spacefractal on 2016-Sep-04
Could been done internally like copy assets for android.

Etc using that function we did for that.

Could extends to jpg as well there....
Title: Re: JPEG not working on shoebox
Post by: Ian Price on 2016-Sep-04
I don't think it's really a big issue, but if other media can be stored in a shoebox (.BMP. .PNG, .WAV, .OGG, .MP3) why not .JPG? What's so different about this format?
Title: Re: JPEG not working on shoebox
Post by: Kitty Hello on 2016-Sep-12
The jpg lib uses its own fopen() so I can't tell it to read from memory. (or I am too stupid to do so)....
Title: Re: JPEG not working on shoebox
Post by: Ian Price on 2016-Sep-12
Not at all Gernot. This was not a question about your competence. I know nothing about the differences between the image formats and wondered why the others could be shoeboxed. Now I know.

As I said, it wasn't a major issue, but it was a question asked a long while ago and the issue still existed.
Title: Re: JPEG not working on shoebox
Post by: spacefractal on 2016-Sep-13
As im wrote, we could implement the hack directly in the function internal as well.
Title: Re: JPEG not working on shoebox
Post by: Kitty Hello on 2016-Sep-14
Would be a start.