• AVR Freaks

Jpeg image not being displayed .. GRC resource converter issue

Author
Serge Etienne Goma
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2014/05/14 02:49:12
  • Location: 0
  • Status: offline
2014/09/04 08:14:41 (permalink)
0

Jpeg image not being displayed .. GRC resource converter issue

Hi all,
 
I'm using a pic32mz micro to drive a 5.7" TFT screen and i'm unable to display jpeg images.
 
The GRC executable is the latest version and came with the Harmony installation files.
 
GRC converts my jpeg file to HEX and generates 3 files:
  • header file (.h)
  • assembly file (.S)
  • and a .c file
However, when i add these file to my project and try to display image using:
 
method 1:
 
#define WAIT_UNTIL_FINISH(x) while(x == GFX_STATUS_FAILURE)
WAIT_UNTIL_FINISH(GFX_ImageDraw(GFX_INDEX_0, 100, 160, (void *) &folderImg));

 
or method 2:
 
   while (ImageDecode
   (
   (void *) &folderImg,
   IMG_JPEG,
   100,
   100,
   10 + 90, // + img width
   100 + 90, // + img height
   0,
   &_jpegFileApi,
   NULL
   ) == 0xff);

 
I get no output on the screen. 
 
I have tried converting the clouds.JPG image supplied with the graphics demo using GRC but impossible to add this image.
I get this error:  "Unknown Image File Type .. Please choose bitmap(.bmp) or JPEG(.jpg, .jpeg)"
 
Now, what's weird is that when i drag the image directly into GRC, it gives no errors !! .. So i've tried to convert but nothing.
Next i tried to save the GRC project in .xml file and i noticed something not quite right in the output i.e.
 
<?xml version="1.0" encoding="ISO-8859-1"?><Graphics_Resource_Converter>
<Configuration>
<major>4</major>
<minor>0</minor>
<compiler>C30/XC16</compiler>

... etc.

 
The GRC program seems to think that i'm using C30/XC16 when in fact i'm using C32/XC32 !! :-(
 
Can anyone help me find the missing link?
 
Thanks in advance.
#1
CinziaG
die fucking humans
  • Total Posts : 3145
  • Reward points : 0
  • Joined: 2016/12/07 14:20:36
  • Location: Wien
  • Status: offline
Re: Jpeg image not being displayed .. GRC resource converter issue 2017/09/09 03:03:16 (permalink)
0
I noticed the same, two days ago: Converted correctly but they can't be shown.
In the Primitive.c file I see no support for JPEG so maybe something should be changed/added (I already did in other cases, but...)
 
MLA 6.2013

in 2018 you signed for your annihilation. in 2019 it will come ;) I promise
my most wonderful creations here
https://www.youtube.com/c...dPFRvtwsbSTXp6Sk6azGOQ
#2
NKurzman
A Guy on the Net
  • Total Posts : 17918
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Jpeg image not being displayed .. GRC resource converter issue 2017/09/09 08:40:52 (permalink)
0
If there is JPEGs support than you enable support for it. By default it only handles bmps.
#3
CinziaG
die fucking humans
  • Total Posts : 3145
  • Reward points : 0
  • Joined: 2016/12/07 14:20:36
  • Location: Wien
  • Status: offline
Re: Jpeg image not being displayed .. GRC resource converter issue 2017/09/09 09:05:14 (permalink)
0
I can't see any such option in my MLA (in the past I added some JPEG code I used to use on a PC in another similar case).
Not sure about Harmony...

in 2018 you signed for your annihilation. in 2019 it will come ;) I promise
my most wonderful creations here
https://www.youtube.com/c...dPFRvtwsbSTXp6Sk6azGOQ
#4
NKurzman
A Guy on the Net
  • Total Posts : 17918
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Jpeg image not being displayed .. GRC resource converter issue 2017/09/09 10:45:29 (permalink)
0
Harmony had a jpeg decoder. But it was a third party library. It was buggy and slow. I am not sure it they ever had it working. I do not know if it was from MLA, or something they added to Harmony. In my case I got better performance from an external flash chip, so I stuck with bmps
#5
CinziaG
die fucking humans
  • Total Posts : 3145
  • Reward points : 0
  • Joined: 2016/12/07 14:20:36
  • Location: Wien
  • Status: offline
Re: Jpeg image not being displayed .. GRC resource converter issue 2017/09/09 10:51:03 (permalink)
0
I see: I am using BMPs too, I just tried quickly JPEG as I faced the "palette" issue two days ago,
but then I improved my BMPs like this
http://www.microchip.com/forums/m1014204.aspx
Smile

in 2018 you signed for your annihilation. in 2019 it will come ;) I promise
my most wonderful creations here
https://www.youtube.com/c...dPFRvtwsbSTXp6Sk6azGOQ
#6
Jump to:
© 2019 APG vNext Commercial Version 4.5