Displaying an image using RPi and QEMU?

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
uberhund
 
Posts: 154
Joined: Tue Dec 02, 2008 4:06 pm

Displaying an image using RPi and QEMU?

Post by uberhund »

Has anyone actually succeeded with this?

I've discovered a few references suggesting how an RPi might possibly be used to display a simple image (e.g., PNG or JPG), but nothing from anyone who's actually succeeded doing it.

Whatever the mysterious approach might be, it must be usable with the QEMU emulator for debugging purposes. The goal, for those wondering, is to display four images of numbers in a row against a clock image (or, possibly, video) background to simulate a digital clock. Don't care if it's within the X UI or not.

Anyone?

tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

Post by tldr »

you might want to start with this. maybe see if you can compose the images with the text on the fly with image magick.

probably not able to debug with qemu, but you can probably do the whole thing in a shell script.

tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

Post by tldr »

well, i was blowing smoke before, but it appears that you really can use image magick to layer some text onto an image.

Code: Select all

~> convert skull.jpg -fill white -stroke black  -family Courier -pointsize 20 -gravity center   -annotate 0 'Must be later than you think'    annotate_rose.gif
~> display annotate_rose.gif
text composed into image with command above.
text composed into image with command above.
annotate_rose.gif (8.01 KiB) Viewed 2373 times

User avatar
uberhund
 
Posts: 154
Joined: Tue Dec 02, 2008 4:06 pm

Re: Displaying an image using RPi and QEMU?

Post by uberhund »

Nice input tldr. I look forward to trying it and will report back. Many thanks.

tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

Post by tldr »

i installed imagemagick and fim packages for the pi. fim is fbi improved. haven't had a chance to try it on the pi, yet, but i had some encouraging playtime this morning on the train with fbi on my laptop.

another thing you might try in x would be processing. it's basically just a preprocessor and a ton of libraries on top of java. it looks like it has a full screen library.

User avatar
uberhund
 
Posts: 154
Joined: Tue Dec 02, 2008 4:06 pm

Re: Displaying an image using RPi and QEMU?

Post by uberhund »

Processing sounds interesting.

I'll check these ideas out as well.

Thanks for using your train time for this!

User avatar
uberhund
 
Posts: 154
Joined: Tue Dec 02, 2008 4:06 pm

Re: Displaying an image using RPi and QEMU?

Post by uberhund »

====================UPDATE===============

Processing: Well, darn. I'm finding references that Processing is not available on RPi

FIM: This looks promising. tldr, would you mind listing the steps I would need to install FIM and imagemagick onto my QEMU and (thereby) Pi? I really will need the QEMU emulation for this project.

Thanks again.

tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

Post by tldr »

are you running qemu because you've been unable to get hold of a pi, or is this strictly and academic exercise? in either case, i can't say that i know much about it. installation on the pi would be as follows...

Code: Select all

apt-get update
apt-get install imagemagick
apt-get install fim
apt-get is a front end to the debian package manager. (oops, i guess i'm assuming that you're emulating one of the debian installations for the pi.) it takes care of package dependencies, so if something you want to install requires the presence of some other package or some library it makes sure that everything is in place.

apt-get update updates the package lists on the pi so that you get access to the latest stuff in the repositories.

apt-get install will install the named package and whatever dependencies are necessary.

best of luck.

tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

Post by tldr »

oops, fim isn't working on my pi, but fbi does...

User avatar
uberhund
 
Posts: 154
Joined: Tue Dec 02, 2008 4:06 pm

Re: Displaying an image using RPi and QEMU?

Post by uberhund »

Right. It seems like displaying four images in a row would be simple for such a powerful architecture. I'm wondering why no one has ever tried this.

tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

Post by tldr »

looks like pygame can access the frame buffer. also works in x of course.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”