/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Jpeg to BMP

Username:     
Password:     
             

Forum

# 1   2009-10-14 15:52:51 Jpeg to BMP

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Jpeg to BMP

We are working on a new Primer, that will have a 320 X 240 LCD.
Until now, we used to save the images as bitmap. It was ok for the icons, but it was an issue for the image of the 'home page' (approximately 128KB). With the future LCD, the size of the images will be approx. 4 times bigger. That's by far too much for the available FLASH...
Does anyone know where to find an efficient 'jpeg to bmp', open source converter that could be easily embedded into CircleOS ?
Thanks for your help.

Offline

 

# 2   2009-10-18 09:00:50 Jpeg to BMP

sjoerd
Member
From: Stad aan het Haringvliet
Registered: 2008-09-04
Posts: 65

Re: Jpeg to BMP

Offline

 

# 3   2009-10-19 10:33:02 Jpeg to BMP

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Jpeg to BMP

Thanks for the links. Did you try to implement one of these algorithm on a Primer ?

Offline

 

# 4   2009-10-19 12:40:01 Jpeg to BMP

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Jpeg to BMP

It seems that all algorithms require too much RAM...At least the image size (*2 for colour). Not possible on Primer1/2.

Offline

 

# 5   2009-10-23 08:58:09 Jpeg to BMP

basic
New member
Registered: 2009-10-18
Posts: 1

Re: Jpeg to BMP

Hi, I'm new here. And have just a few hours experience in practical STM32-programming. So go easy on me. :-)

A quick look tells me that the first link above does BMP=>JPG only, not the other way. (Did I glance too quickly?)

The second one seems pretty simple to modify so that it calls a function provided by the user for every decoded JPG block (max 16x16 pixel). If that function sends the block directly to the LCD, you'll only need a 16x16 frame buffer in the STM32.

Maybe I'll look into such a mod this weekend.

But beware, that code includes a bunch of floating point calc in the inner loop. I don't know how well that will work on the STM32.

Offline

 

# 6   2009-10-23 10:07:46 Jpeg to BMP

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: Jpeg to BMP

Effectively it uses float variables for the DCT (Discrete Cosine Transform), and it will not do it with CircleOS !
But it seems that it would be possible to replace this function by another one with integer calculation (see the libjpeg site, it exists several versions).

Offline

 

Board footer