How to from vb save clipboard to tif without writing intermediate bmp?

Asked By 0 points N/A Posted on -
qa-featured

I'd like to from vb save clipboard to tif and have found some VB code to retrieve the clipboard (Clipboard.GetData) and SavePicture which saves it as a bmp file, and then I can create a New Bitmap to load the bmp file and use its Save method to save into any format I like. However I don't want to save it to disk as a .bmp file first, is there a way to store the .bmp file in memory and access the Save method of the Bitmap class?

SHARE
Best Answer by Belmon Samson
Best Answer
Best Answer
Answered By 0 points N/A #170865

How to from vb save clipboard to tif without writing intermediate bmp?

qa-featured

Hi,
    The answer can be more precise if you told exactly which language were you using to implement this application.

Still, yes! there is definitely a way to store the BMP file in the memory and access the method of the class to save.

All you have to do is to declare a file type binary in the class member variables and write save this file as that file.
This file will be virtually stored but will remain in the memory during the program execution.

Hope you got your answer! 🙂

Answered By 5 points N/A #170866

How to from vb save clipboard to tif without writing intermediate bmp?

qa-featured

You can store image on database, and directly on video card in the form of bitmap. There is a difference of 8 bpp in between the bitmap access and access from clipboard through VB. Bitmap reads and 24 bpp. Hence, you need to use the lockbits and Unlockbits. You can use these methods in VB for loading and unloading the images from a clipboard. This way you can easily load and unload the images without using a database.

Related Questions