Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Save Clipboard Images As Jpg's ? Convert Bmp To Jpg


Are there any conversion functions in vb to convert a clipboard image (bmp) to a jpg format?

Mike




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Clipboard Images
I found a simple app that lets you copy images from a digital cameron onto the clipboard. I tried it and it works fine.

However, I have only been able to retrieve the first image, using the Clipboard.GetData routine like this...

VB Code:
If TWAIN_AcquireToClipboard(Me.hWnd, nPixTypes) = 0 Then        MsgBox "No image was acquired or transfer to the clipboard failed.", vbInformation, ""    Else        Picture1 = Clipboard.GetData(vbCFBitmap)    End If


How do I retrieve ALL the images from the clipboard, OR, how do I remove a single image from the clipboard, so that on the next call to clipboard.getdata it retrieves the next image?

Thanks for any help!

VBA And Clipboard Images
Okay, this is a good one.

Using VBA (not VB), how can the APIs and code be set up to copy a screen shot of Microsoft Access to the clipboard, then save the clipboard to a file (bearing in mind that there is no Clipboard object in VBA)?

I'm using Office 2000 by the way...

Thnx in adv.

Ian J.

Images And Clipboard
Hi,
you can even save images as jpg and change the quality of the file. just have a look at this threat:

http://forums.vb-world.net/showthrea...threadid=64832

Copy 2 Images To Clipboard
This line of code successfully copies an image to the clipboard. However when I use it twice, the second image overwrites the first. How can I copy 2 images to the clipboard?

Clipboard.SetData picCorr.Image, vbCFBitmap

Saving Images From Clipboard
My app takes a snapshot from my webcam and places it on the clipboard. What code would i need to open a save dialog and save the clipboard image as gif, jpg etc

Convert Clipboard RTF Data To Ascii
I'm using the WebBrowser Control and MSHTML to create a WYSIWYG web text tool.
Here's the problem. If the user copies and pastes from something like MSWord, it brings in all the XML crap along with the text. All I want is the basic text.
Is there a way to only allow ASCII text in the clipboard...no RTF or XML or anything else?

thanx

Having Real Probs Images Onto Clipboard
Hi there.

I am doing this at the moment. It gets a jpeg from disk and sticks it on my form
as a lovely thumbnail. Basically it uses picture1 as the size for the picture2 box where it is displayed.

Picture1.Picture = LoadPicture(filename)
Picture2.PaintPicture Form1.Picture1.Picture, 0, 0, Form1.Picture1.Width, picture1.Height
Clipboard.SetData Form1.Picture1.Picture

Now this is all well and good but I want the picture that is copied to the clipboard to be cropped to some different shape. I have searched for ages and can't find how to do this. The image is very large so it will never fit on my form.
I am sure I am missing something obvious but I just can't find how to do it.
Thanks

Save 'y' To Clipboard
Here is part of a subroutine:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Code:
y = 1
Name = LCase(Name)
For x = 1 To OldRng.Rows.Count
If InStr(LCase(OldRng.Cells(x, 2)), LCase(Name)) <> 0 Then 'If this line contains selected name,
Range(OldRng.Cells(x, 1), OldRng.Cells(x, 6)).Copy NewRng.Cells(y, 1) 'Copy found name to new area
y = y + 1
End If
Next x
Range(y).Copy
^^^^^^^^^^^^^^^^^^^^^^^^^^^
It all works except the last line.
After the loop completes, I wish to save the value of 'y' to the clipboard. But obviously I don't have it correct.

Save Graphic From Clipboard
Internet Explorer allows a user to right click an image in a web page and click "COPY". This copies the image to the clip board. Now, now, through VB how do I save the image from the clip board to a file on disk?

Save Picture From Clipboard
Hi,
I wanted to make a *small* application which can monitor the clipboard for *pictures*only* and save them whenever there's a change. I want to make it *small& because I don't have the installation rights on the computer I want to use it on! So please suggest the easiest way out.... I we can't monitor the clipboard, then just a save from the clipboard would do for the time being...

Thanks all!

Save A Graphic From The Clipboard
Anyone knows how to save a graphic from the clipboard into a new bmp file?

thanks

Print, Save And Copy To ClipBoard
I have a program which for ever letter you type into a text box, it puts an image into a picture box using BitBlt. I dont know how to print, save or copy the Picture to a clipboard (So you can use it in other programs)

The picturebox is called: pixExport
And the menu for save is: mnuSave
" "Print is: mnuPrint
" "Copy is: mnuCopy

Could any one kindly give me the code please?

Save Clipboard Image To File
Hi, is there a pure API method (i.e. no DLL's, OCX's, etc.) that will save a clipboard image to a file (e.g. jpg) for legacy VB/VBA?

Save MetaData From Clipboard Into A File.
I am working with VBA and NOT VB, so there is no Clipboard control to use with the SavePicture method.

If a user already has a metadata/file in the clipboard, how can I save that into a file?

The close I got is from this thread:

http://www.vbforums.com/showthread.php?p=2951151

How To Save Clipboard Image As Jpg Format
Hi

I want to save the clipboard image as jpg format in local drive. The clipboard image now save in bmp format.But i need to save directly in jpg format. please help me.

After Copy To Clipboard Word Ask Me To Save Changes
Hi.
Im using this code to from PEEP to copy from VB and paste into msword, This code allow me to copy and pasting into word 97 or word 2000, it uses objects. The problem is that when i kill the doc Word ask to save changes, how can I remove this message and keep this code compatible with both versions of word??

(when I click on 'COPY' button this sub start running, but Word is not open, the message im getting is generated by the Word instance inside this sub)

Here is the code:


Code:
Private Sub CopyGrid()
On Error GoTo ErrorHand:
Dim objWord As Object 'instead of Word.Application
Dim objDoc As Object 'instead of Word.Document

Dim strData As String

If objWord Is Nothing Then
Set objWord = CreateObject("Word.Application")
Else
Set objWord = GetObject(, "Word.Application")
End If
DoEvents

With MSFlexGrid1
.Row = 0
.Col = 1
.RowSel = .Rows - 2
.ColSel = .Cols - 1
strData = .Clip
End With

'The Clip property separates Rows with a carriage return. These
'need to be converted to Tabs as well in order to create the Word Table properly.
strData = Replace(strData, vbCr, vbTab)

Clipboard.Clear
Clipboard.SetText strData

'Create the Word Table by pasting the Grid Text into a document
'and then use the ConvertToTable method
Set objWord = New Word.Application
Set objDoc = objWord.Documents.Add
objDoc.Range.Paste
objDoc.Range.ConvertToTable wdSeparateByTabs, MSFlexGrid1.Rows - 2, MSFlexGrid1.Cols - 1

'Copy the Word Table to the Clipboard. The user can then Paste
'the table into their word documents.
objDoc.Range.Copy

'----------------------- quit word --------------------------
If Not (objDoc Is Nothing) Then Set objDoc = Nothing
If Not (objWord Is Nothing) Then objWord.Application.Quit
If Not (objWord Is Nothing) Then Set objWord = Nothing
'------------------------------------------------------------

ErrorHand:
Resume Next
End Sub

Save Clipboard Content To Disk
Somebody please help me to copy my clipboard content (BMP) to a file. If you can gimme the code to directly transfer the contents of my clipboard to the clipboard of a remote user it would be even better.

Please help
Arvind

How To Save A Screen Capture From Clipboard
I'm trying to figure out how to do a screen capture of a Excel userform, then save it to a image file. I've figured out the screen capture part, but am having a helluva time getting the clipboard contents into a file on the hard drive.

What I've got so far is:

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
  bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Const VK_SNAPSHOT = &H2C

Sub PrintScreen()
    'This places the image in the clipboard
    keybd_event VK_SNAPSHOT, 1, 0, 0
End Sub


Sub saveit()

   ???????????????

end sub

I've seen other topics referring to downloadable .dll's and .com's, but I'm limited to what came with Excel (our system administrator WON'T let us install anything ).

Any help would be greatly appreciated!

How To Save Clipboard Image As Jpg Or Gif Format
hi
i want to save the clipboard image directly jpg or gif format in vb. pls help me....

How To Save The Image Without Accessing Clipboard?
Hi,

I am using data to generate charts. Rightnow I am using the following inbuilt functions to save it as bmp.

chart.EditCopy
SavePicture Clipboard.GetData, "C: emp.bmp"

Previously this program was running on Win 2000 Advanced Server. Now the server has been changed to Win 2000 Terminal Client Server and with that this part of the code does not work anymore. It gives me standard error message "Cann't Open Clipboard".

As I am not too familiar with the OS differences, I thought it would be better if I could avoid using clipboard to save the image as bmp.

It would be of a great help if anyone has any hint or solution to this problem.

Thank you,

Regards,
Swati

How Do I Save An Image In The Clipboard As A .bmp File?
I mean to say "save the contents of the form just as it looks on the screen into a .bmp file" and also print them.





Thanks
Harini
Even Impossible says I'm possible

Convert Images (GIF, JPG, PNG, TIF Etc) To PDF
We presently have the version 5.0 of adobe and we have managed to convert images to PDF easily but we had to load the complite Application witch is useless and long.

Is there a simple way to make those convertion without loading the full application component in VB? The adobe site and documentation is not clear on that point.

Thank you very mutch!

Gabi

Stopping Do You Want To Save Question And Do You Want To Empty Clipboard?
I wrote a VBA routine in Excel that opens a number of spreadsheets (one by one) and copies and pastes the contents of some cells to another spreadsheet. This part works fine.

The routine closes the spreadsheet once the copy and paste are done and prior to getting the next one. When it goes to close, it asks if I want to save. I have not changed the worksheet but this comes up because I am using Office and Windows XP and the sheets were created in an earlier version. I always click "no", for a hundred sheets, 100 times. I also get asked if I want to save the clipboard, again I answer "no" sometimes 100 times.

Is there anyway to eliminate these two questions so the routine will run without stopping?

Thanks!!

I Am Storing Images In A DB And Need To Convert Them
I am scanning in images and storing images in a Database. The ability to save as a jpg appears to be scanner dependent so I want to convert the file type to a jpg from a bmp so as to help keep down the Database size slightly. Could someone please point me in the direction of a (free) library for doing this conversion?

Setting compression strength would also be an advantage.

Need Object To Convert Images, BMP - GIF Plus...
Hi all,

The answers I have found archived on this site are vague.

I need an object which can load and save BMPs and GIFs
(JPGs ok too) - plus change and manipulate size and
color depth (compression would be nice too).

The only solution I have seen posted in these archives are a
reference to an object derived from an MS Office library - I think
it was an Excel library.

The end product I am looking to create should not be dependant
on office products. I can ship external DLLs to my install base if
I have to, but not an entire office product like Excel.

Any objects out there like this? If there are one or 2 DLLs out
there with these objects, I would like to know about them.

Thanks!

Dave

How To Auto Save Image From Clipboard To Gif File Format?
When I run my program I want to press F6 to get data from clipboard. If it is an image my program will be auto save to gif file format. But I can't code it.

Please help me how to coding sub routine to auto save image from clipboard to gif file format.

Thank you for all answer.

Convert Paletted Images To 32bpp With Gdi
hi there, that might be trivial, but after searching the threads, it seems everyone in here is trying to lower the number of colors of an image.. I'm actually trying to do the opposite - converting say a 256 colors/grayscale paletted image to 32 bpp... And i just can't seem to find the info i need.

I am using the gdi+ tlb, and i am basically loading pictures in a folder to display them as a screensaver/slideshow. Turns out i have a few grayscale pictures in there, and when i load them into a graphics object (for stretching and fill the screen) as 32bpp, it actually looks like it's lowering the colors to 16 or less. I tried experimenting with bitmap.convertformat , but it requires a pointer to a palette.. ?! and of what i know, 32bpp isnt a paletted color mode

Maybe it's just getting too late and i;m missing the obvious, but i'm sure it's not that complicated..



Code:
img.LoadFromFile fileName

If img.PixelFormat <> PixelFormat32bppRGB Then

... ?

Capture Images Convert To Text?
Is it possible to capture an image and covert its context into text? For example, if I have a program open and it displays only the numbers 380 is it possible to create a program to capture that those numbers and covert it into text? I've done several searches on this subject but I really don't know what to look for. If it is possible, how do I go about doing this?

Save As / Convert To .MMF
Any ideas on how to go about this?
Or suggestions on where I should start looking?

thanks in advance.

Everybody body is somebodys Nutter.

Save Images
I downloaded a free Calendar control at this site www.abstractvb.com/downloads/imagecal.asp that lets you add images to the calendar. The trouble is, I can't get the author of the control to respond to tell me how to save the images to a file once the images are added to the Canlendar. Could anyone help me figure out how to do this?

How Can I Save My Images As JPG?
i try to save my images as JPG.
using 'savepicture' method i can save only as bmp.
also, i try using 'kodak image edit' control but i still have the same proplem.

Save Images To Files
Hi!
I have problems saving images into files. These images are drawn inside a picture box during run time. When I tried to use SavePicture method , all I can see is the picture box's picture. The images are not captured along with the picture box. Any advice?
Thanks!

Quick Way To Save Images
I need a quick way to save screen shots. What i need is for the computer to take a screen shot every second and save each image. I know I could save the images by doing a count to I need to figure out a quickway tosave the image.

Save Images To Files
How can I create new image file with specified width and height by using GDI+?

Save All Webpages && Images
Hi,
I want to save all webpages & images from a site automatically like webzip.How can I do this?
thanks

How To Save Images In Other Formats?
is there anyway that i can save an image that i open using:

Code:
Image1.Picture = LoadPicture(Text1.Text)
...I want the user to be able to open formats such as jpeg, bmp, dib, ect... and i want them to always save as ".png" files, is this possible? I also would like to be able to show the file size in Label1.Caption. Thanks!

Save Images To A Directory
Hi,
I have a Folder called 'Images' and I want to be able to save multiple images in to this folder ( they are mostly BMP's and JPG's) I want to user to be able to browse for images pick them either multiple or single and save to the folder Images.

Whats the easiest way to achieve this?

Thanks

How To Save Images In DataBase
I use Access XP to save my records.

And DataEnvironment on my connections. I try to save it like this..


With DataEnvironment1.rsCommand1
.AddNew
.Fields(0).Value = Text1.Text
.Fields(1).Value = Text2.Text
.Fields(2).Value = Image1.Picture
.UpdateBatch
End With

But this code encounter an error.. Please check my project attached with this thread to know more about my problem...

Save Images Into SQLServer
Hi all.......... First, scuse me my english.

I have a problem, I want to save an image JPG into a field IMAGE, usingSQLServer.
I =B4m using code ADO. The problem is, that when I insert the value intha table, it insert in blank.

The code that I using is:

*********Form Load*******
***cd is a control CommonDialog
***rs is my recordset
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.ConnectionString = "Provider=SQLOLEDB.1;Persist SecurityInfo=False;User ID=sa;Initial Catalog=Curso;DataSource=servidor"
cn.Open
rs.Open "select * from timagen", cn, adOpenDynamic, adLockOptimistic
Set Image1.DataSource = rs
Image1.DataField = "imagen" 'Field in the table, type IMAGE(Long Binary)

********Code button Insert************
rs.AddNew
cd.Filter = "Archivos JPG|*.jpg"
cd.ShowOpen
If Len(cd.FileName) Then
Image1.Picture = LoadPicture(cd.FileName)
rs.Fields(1).Value = Image1.Picture


rs.Update
End If
************

Please, can anyone help me?
Thanks.

Save And Get Images Of Access With VB
Hello, I get a DB in Access I need to save and get images saved in this DB using VB, How can i do that?

tahnks

Save 2 Images In One File
Hi, I have a (I hope simple) problem.
I am creating a cover print application so I load 2 images (front and back) into two different Image objects (no Picture objects). This works fine, but know I would like to save these two images into one file so I can open them again, without having to keep the original two image files.

I have found a code on the internet to save a image and text into one file, but I need two images in one file.

Please help me,

Jasper

Save Background Images
Hi!,

I have a program with a background that the user can choose to have (format like tile, centre or etc....). My problem is after the user select the images and the format as tile, when exit the program and login again, the background images is gone.

What I want is after the user have select a images and exit the program, when login again, it's show the previous image background.

May I know how do to it?

Save Images In Access Using ADO In VB6
How To Save Image File as OLE Object in Access OLE Object Field using ADO as database access object in VB6

Save Images In Database
DB: Access/Oracle

How can I save/load imageges to/from database?

Regards,
Ajay

Convert And Save Files With DirectShow
If you reference quartz.dll in VB, you can get some DirectShow objects which let you arrange various media filters/codecs into what's called a "filter graph". This can be handy for doing all sorts of media type conversions. The process is much easier if you use the Filter Graph Editor program, graphedt.exe (sometimes named graphedit.exe?). But sometimes you want to do it programmatically from VB. The problem is, Microsoft didn't expose all the DirectShow interfaces for VB. For example, I wanted to convert MP3 files to WAV files. It's very easy in the Graph Editor program; yet in VB, you can link-up all the required filters, but you can't set the file name for the last "File writer" filter.
After banging my head for awhile trying to get this to work, I found this site:

http://www.gdcl.co.uk/howto.htm

There's some good DirectShow info there as well as a free dll that allows you to use the file writer filter (and other things). Here's the link to the dll:

http://www.gdcl.co.uk/FSFWrap.zip

The site claims that the size of the download is 11K , but it's actually 70K.

It works well for me. MP3-to-WAV or WAV-to-MP3 is no problem, and with all the different filters/codecs available there's no telling what you might generate.

Just thought I would share that.

[help] Save A Text In Multiple Images
Hi, i hope you can help me

i put some text in a picture box and i save it as a Jpg image BUT the text is bigger than the height of the image, so i want to put the text in two (or more) diferents images.

i dont know how determine when finish the first page and where start the new page. please help. Any ideas

I post a screenshot of the project:

http://img226.imageshack.us/img226/5...nttulo15oq.jpg


PD. i use Drawtext to put the text in the picturebox.

Load Or Save PNG/TIFF/JPG/GIF/BMP Images Using GDI+
GDI+ while usually used in .net applications, is also available to VB5/6 using declares or a type library.

This sample application shows how to use GDI+ to save images to various compressed image formats.

If you have the gdiplus.dll installed in your windows(winnt)system(32) directory, then you can use this code. If not its available at:

http://www.microsoft.com/downloads/d...displaylang=en

Any 32 bit OS aside from Win95 can use the gdiplus.dll, making it an excellent FREE alternative to image controls when saving to compressed formats.

Note: GIF files are covered by the Unisys patent until June, 20 2003.

Last Question...problem When I Save Images..
sorry for all this questions in this days..but i'm a begginner and i've got some problems with my program....i think that this is the last problem...
I resize images with my program, I give size to photo from a textbox...but if I insert 640*480 or 320 *240 or others sizes...then it saves as 636*476 or 316 *236...it losts always 4 pixel....and i don't know why...can you help me please??



VB Code:
On Error GoTo erroreDim i As IntegerDim foto As PictureDim x As IntegerProgressBar1.Max = File1.ListCount - 1ProgressBar1.Value = 0For i = 0 To File1.ListCount - 1ProgressBar1.Value = iIf File1.Selected(i) = True ThenSet foto = LoadPicture(File1.Path & "" & File1.List(i))Form2.Picture1.Picture = fotoForm2.Picture2.PaintPicture Form2.Picture1.Picture, 0, 0, Form1.Text1.Text, Form1.Text2.TextSavePicture Form2.Picture2.Image, "C:Photo" & i & ".jpg"End If  Next i Form2.Show  Exit Suberrore:MsgBox ("digitare prima le dimensioni desiderate")  End Sub



and I use also this to adapt picture box to photo



VB Code:
Private Sub Form_Load() Form2.ScaleMode = Form2.Picture2.ScaleModeForm2.Picture2.Width = Form1.Text1.TextForm2.Picture2.Height = Form1.Text2.TextEnd Sub


many thanks...

Save Multiple Images To One File
How can we save multiple images from Picture boxs to a file, then load them back to the picture boxes?

Copyright 2005-08 www.BigResource.com, All rights reserved