User avatar
vdia1130
Posts: 4
Joined: Sun Oct 27, 2013 6:26 pm
Location: Orlando, Fl

Transition 2 Images Raspberry Pi Using Hardware Acceleration

Sun Oct 27, 2013 7:52 pm

Disclaimer: Newb to Pi with a JavaScript programing background.

I've been at it for two weeks now (researching and trying different things) to create an image slideshow on the Pi but using hardware acceleration. I've tried several libraries like node-openvg-canvas, pi-presents, and openvg... All of which has had their set backs.

node-openvg-canvas: No support for image transparency
openvg: No support for image scaling
pi-presents: Requires X to be running (added bottleneck)

All I need is:
1. Read image from directory
- Know when the image has loaded as images are added to directory at runtime
2. Transition from one image to the other
- Using scale (modifying width and height)
- Using translate (modifying x and y coordinates)
- Using alpha (modifying image opacity)
3. Run on a timer (checking directory for new images)
4. Run standalone (headless) on the GPU

I've written this in NodeJs, ActionScript (before I thought of using the Pi), and JavaScript with a PHP backend, but am willing to do this in other languages (python, ruby, c, c++ but am not familiar with any of these) if it means making use of the GPU on the Pi.

If instructions for using one of the aforementioned languages, please inform (or direct me to link) on how to import the OpenGL ES libraries.

Any help is greatly appreciated.

Thanks!

Vic

RoyLongbottom
Posts: 334
Joined: Fri Apr 12, 2013 9:27 am
Location: Essex, UK
Contact: Website

Re: Transition 2 Images Raspberry Pi Using Hardware Accelera

Tue Oct 29, 2013 11:00 am

It looks as though OpenGL ES via C uses hardware acceleration, as in my benchmark. The following shows where I found out where to start and details of the benchmark with a link to download the source code. The benchmark uses RAW image files.

http://www.roylongbottom.org.uk/Raspber ... m#anchor18

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: Transition 2 Images Raspberry Pi Using Hardware Accelera

Tue Oct 29, 2013 11:19 am

There is also the dispmanx library (not well documented) which may help with what you are trying to do.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
vdia1130
Posts: 4
Joined: Sun Oct 27, 2013 6:26 pm
Location: Orlando, Fl

Re: Transition 2 Images Raspberry Pi Using Hardware Accelera

Tue Oct 29, 2013 1:25 pm

Hello, Thanks for the reply. I've decided to jump ship for now and write this in Java running on an Android stick. I may come back to this at a future time.

User avatar
paddyg
Posts: 2529
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Transition 2 Images Raspberry Pi Using Hardware Accelera

Fri Nov 15, 2013 10:44 pm

You're probably well down the java android route now but pi3d has a SlideShow demo. It's using OpenGLES2 so you can pretty much do whatever you want to your slides, apply shaders, draw them on 3D shapes, move them nearer and further, use transparency etc.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

Return to “OpenGLES”