Main Site Documentation

Print Screen


#1

hello,
How can we save on a SD card a gif (jpg …) file which would be the content of the screen. I tried to put on a file the result of the GetBitmap() method of the bitmap object being visualised on the screen but this leads to a huge file of byte but unreadable as a gif or jpg file.


#2

There is no JPEG/GIF encoding in NETMF only decoding. You should be able to save image as bitmap but you still need to convert the image from 16bit image to whatever BMP needs.

Either way, you need a some RLP driver to do this if you need speed. JPEG will be slow to encode but it will give much smaller images


#3

There is not .save feature on the Bitmap object Gus. He’ll need to save manually by encoding his own bitmap or just doing a raw dump.


#4

[quote]There is not .save feature on the Bitmap object Gus. He’ll need to save manually by encoding his own bitmap or just doing a raw dump.
[/quote]

Yes like I said “You should be able to save image as bitmap but you still need to convert the image from 16bit image to whatever BMP needs.”


#5

Yeah sorry I didn’t see that


#6

Too bad !
is it possible to encode bmp easily with NETMF?


#7

Easy as in using built-in functions, no. Easy as in you can implement an algorithm and do it yourself? Yes. For a dictionary style compression it may take multiple passes at the file, one to build the dictionary, one to compress it, etc.

The issue comes in when you try to have 2 files open at once, I don’t think the .NET MF framework implementation supports it, even if one is opened as read only, but I may be mistaken. Otherwise you would need to open one file, buffer the data, close it, open the file you are writing to, save it, close it, and repeat until you process the whole file, then delete the original. Depending on the size of the screen, this could take a few seconds to do.


#8

BMPs do not NEED compression. A uncompressed BMP is [relatively] easy to create. One thing you should note is that they are stored UPSIDE DOWN.

http://en.wikipedia.org/wiki/BMP_file_format