Author Topic: JPEG not working on shoebox  (Read 4856 times)

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1600
    • View Profile
    • AMpostata Website
JPEG not working on shoebox
« 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)
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: JPEG not working on shoebox
« Reply #1 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
Current fave quote: Cause you like musicians and I like people with boobs.

MrTAToad

  • Guest
Re: JPEG not working on shoebox
« Reply #2 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...
« Last Edit: 2011-Sep-10 by MrTAToad »

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10760
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: JPEG not working on shoebox
« Reply #3 on: 2011-Sep-12 »
It should be possible with a stupid hack. I had not time to do that, yet.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4160
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: JPEG not working on shoebox
« Reply #4 on: 2016-Sep-04 »
It's been a very long time, but any chance of fixing .JPG files in Shoebox?
I came. I saw. I played.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10760
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: JPEG not working on shoebox
« Reply #5 on: 2016-Sep-04 »
As a hack: openfile, read and write to a temp file.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3930
    • View Profile
    • Space Fractal
Re: JPEG not working on shoebox
« Reply #6 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....
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4160
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: JPEG not working on shoebox
« Reply #7 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?
I came. I saw. I played.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10760
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: JPEG not working on shoebox
« Reply #8 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)....

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4160
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: JPEG not working on shoebox
« Reply #9 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.
I came. I saw. I played.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3930
    • View Profile
    • Space Fractal
Re: JPEG not working on shoebox
« Reply #10 on: 2016-Sep-13 »
As im wrote, we could implement the hack directly in the function internal as well.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10760
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: JPEG not working on shoebox
« Reply #11 on: 2016-Sep-14 »
Would be a start.