Displaying an image using RPi and QEMU?
Moderators: adafruit_support_bill, adafruit

Displaying an image using RPi and QEMU?

by uberhund on Fri Feb 22, 2013 12:37 am

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?
Hacking is an addiction. Arduino is the gateway drug.
User avatar
uberhund
 
Posts: 124
Joined: Tue Dec 02, 2008 4:06 pm

Re: Displaying an image using RPi and QEMU?

by tldr on Sun Feb 24, 2013 12:54 am

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.
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

by tldr on Sun Feb 24, 2013 1:16 am

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 | TOGGLE FULL SIZE
~> 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


annotate_rose.gif
text composed into image with command above.
annotate_rose.gif (8.01 KiB) Viewed 1780 times
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

by uberhund on Sun Feb 24, 2013 1:36 pm

Nice input tldr. I look forward to trying it and will report back. Many thanks.
Hacking is an addiction. Arduino is the gateway drug.
User avatar
uberhund
 
Posts: 124
Joined: Tue Dec 02, 2008 4:06 pm

Re: Displaying an image using RPi and QEMU?

by tldr on Sun Feb 24, 2013 3:14 pm

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.
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

by uberhund on Mon Feb 25, 2013 11:14 am

Processing sounds interesting.

I'll check these ideas out as well.

Thanks for using your train time for this!
Hacking is an addiction. Arduino is the gateway drug.
User avatar
uberhund
 
Posts: 124
Joined: Tue Dec 02, 2008 4:06 pm

Re: Displaying an image using RPi and QEMU?

by uberhund on Tue Feb 26, 2013 8:32 am

====================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.
Hacking is an addiction. Arduino is the gateway drug.
User avatar
uberhund
 
Posts: 124
Joined: Tue Dec 02, 2008 4:06 pm

Re: Displaying an image using RPi and QEMU?

by tldr on Tue Feb 26, 2013 7:53 pm

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 | TOGGLE FULL SIZE
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.
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

by tldr on Wed Feb 27, 2013 8:52 am

oops, fim isn't working on my pi, but fbi does...
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Displaying an image using RPi and QEMU?

by uberhund on Wed Feb 27, 2013 5:15 pm

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.
Hacking is an addiction. Arduino is the gateway drug.
User avatar
uberhund
 
Posts: 124
Joined: Tue Dec 02, 2008 4:06 pm

Re: Displaying an image using RPi and QEMU?

by tldr on Sat Mar 02, 2013 8:42 pm

looks like pygame can access the frame buffer. also works in x of course.
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am