[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Fast screen dump via frame buffer in unix

Asked by glebspy in X-Windows Window Manager, Graphics, Unix Systems Programming

Tags: Import screen dump unix

I need to read an area of my screen about 15x15 pixels, such that the operation is fast, i.e. less than half a second. I have been using Imagemagick tools via import -screen -window root -crop 15x15+100+100 a.bmp , but I cannot get it under 2 secs - this is way too long for my needs. My screen is 24dpp at 1920x1200 resolution (and I need to use this resolution).

I wondered if there was some way of speeding it up e.g. by reading the memory directly via the frame buffer or otherwise and if you can help me with a command.

A guy on the imagemagick forum suggested something along the lines of

convert -size 1920x1200 rgb:/dev/fb0'[0]'  -channel RGB -separate -swap 0,2 -combine outfile.png

but it doesnt work - it gives me the error "convert: Unexpected end-of-file `/dev/fb0': Invalid argument."

Thanks

Victor
[+][-]07/02/09 07:22 AM, ID: 24763633Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625