But when I try to open the extracted BMP is MS PAINT or some other pic editor it says invalid format ....... The browser does not display the image either .....
Can some one please help me ?
It is the mark of an instructed mind to rest satisfied with the degree of precision which the nature of the subject admits, and not to seek exactness when only an approximation of the truth is possible.
-Aristotle As quoted in Rapid Development, chapter 8, page 167.
Since the data stored in the clipboard is raw BMP data (with a header), couldn't you just get a pointer to the start of the BMP data in the clipboard, copy it to your own byte array, and save that as a file? It would be much more efficient than your current method.
It is the mark of an instructed mind to rest satisfied with the degree of precision which the nature of the subject admits, and not to seek exactness when only an approximation of the truth is possible.
-Aristotle As quoted in Rapid Development, chapter 8, page 167.
I think the problem here is the Bitmap Header version. Later versions of the Windows BMP actually allow JPEG compression I think (so it says in MSDN anyway).
SavePicture function might save as BITMAPV5HEADER but your copy of mspaint.exe might only be able to read BITMAPV4HEADER or so.
The trick around this is to open it up in a decent graphics program and save as an older bitmap. Paint isn't exactly known for it's superb power.
Windows Explorer shows a preview of the invalid BMP...
Windows Explorer shows a preview of the invalid BMP...
But I can't open it in MSPaint ...... or MS Photo Editor....
I have a code that converts BMP to JPEG ........ but even that won't work with this Invalid BMPs ..........
It is the mark of an instructed mind to rest satisfied with the degree of precision which the nature of the subject admits, and not to seek exactness when only an approximation of the truth is possible.
-Aristotle As quoted in Rapid Development, chapter 8, page 167.
Try inserting it to a web page .......... then it will show it ......
but still can't open it in MS Paint .....
It is the mark of an instructed mind to rest satisfied with the degree of precision which the nature of the subject admits, and not to seek exactness when only an approximation of the truth is possible.
-Aristotle As quoted in Rapid Development, chapter 8, page 167.
It is the mark of an instructed mind to rest satisfied with the degree of precision which the nature of the subject admits, and not to seek exactness when only an approximation of the truth is possible.
-Aristotle As quoted in Rapid Development, chapter 8, page 167.
When i insert that bmp into a web page using a img tag it displays correctly .........
When you right click it and click "save image as ..." the default option is to save as WMF .......... ????
It is the mark of an instructed mind to rest satisfied with the degree of precision which the nature of the subject admits, and not to seek exactness when only an approximation of the truth is possible.
-Aristotle As quoted in Rapid Development, chapter 8, page 167.