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




VBA Question: Open JPEG, Get Image Size


In VBA in ArcMap, I need to open a JPEG file and get its image size. I've added a reference to System.Drawing, so now I can at least Dim a variable as a Bitmap, but when I try to type in the Bitmap constructor specifying the file path, basically VBA doesn't recognize the syntax. What am I missing?

Thanks,
danl




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
JPEG Size
Does anyone know what the largest a 233 wide by 201 high jpeg file size is? I'm sending the data of the JPEG over winsock (using Open <file> for Binary) and I was wondering what the max size that a 233 by 201 JPEG could be.


Thank You much

Getting The Size Of A JPEG
Hi.
I wonder if anybody knows a way to get the height and width of a jPEG image without ever loading it into a picture box or image box.

Is that possible?

Thanks

Wengang

Jpeg Convertion Size
1. Hi have anyone here a script that explains how to resize a jpg file ?
2. ANd to resize all jpg files in a directory.

Jpeg Pictures Re-Size In Pic Box
Dear all,

I have one application in which i am accessing pics . now the problam is the pics are not same size. one is too big one is too small..i want all the pictures to be set in my picture/Image box . Can anyone advice me in this issue
Thanks in advance
satish kumar

Reducing File Size Of Jpeg
ei gud day,
its me again, i always have a question, ^_^. Just want to know how can i reduce the file size of my jpeg image without resizing the picture. the dimension of my jpeg is in the range of 100 X 100 (not that sure, but very close to that size) and the file size is 120KB(not that sure again, but still close to that size). I just wonder why the file size is too big when i save it, because the usual(the one that i've seen) size of a jpeg image with that dimension is just 30 to 60 KB.

I don't want to resize the picture because i've already resize it(the original size is around 1000 X 1000).

Im not saving in a database, just in a folder.

JPEG Image
Hi all,

I want to create a program that just displays a JPEG image in a picture box for about 3 seconds...

Can anyone help me produce this ?

Thanks for any help

Open Jpeg From Cab?
Is it possible to package a jpg in a cab and then open it with my activeX control? I'm using :
Open "C:whatever.jpg" For Binary Access Read As #MyFile

I want to do the same thing, but get the file from .CAB

Thanks.

Saving Jpeg Image
Hi all!

I have a picturebox with an image in it (it's a screenshot actualy) and i would like to save this image to a jpeg file using freeimage. Anyone have a clue of how this can be achived?

Help is apprichiated!

How To Compress An Bmp Image To Jpeg
Hai,

I am working on a server - client application in which i need to send tge windows on the client's desktop to the server. Thes images are stored as BMP's and are to be compressed into jpeg before they are to be transferred to the server.

I need a code or suggestion regarding how to compress an bmp into jpeg and that compression should be as fast as possible.

How To Compress A Jpeg Image In Vb
Hi all,

We are developing a server-client application in which the server has to monitor all the windows that are opened on the client's desktop i.e., all those windows that are opened in the client's system must be displayed on the server's desktop.All the changes made on the client system should be updated on the server system simultaneously.

Now, to do this we have to copy all those windows on the client's desktop to the server desktop. We have to copy those windows as JPEG files. But because of the huge size the system is slowing down a bit.How should we compress this image so that the size will be reduced and will not effect the system speed.

We need some suggestions or code to do this.

Any kind of help is highly appreciable .

Thank you,

Saving A Image As JPEG
Does anybody know how to save an image from a picture box as a jpeg file,GIF file or some smaller file formats instead of the bitmap files which are large in size????

JPEG Image Conversion
I'm looking for some code which will allow my vb program to scan images of different sizes from my scanner, convert the image to a standard size and store the image as a .jpeg file. If anyone knows how to do this, I'll take my hat off to you.

Jpeg Image Conversion
I require some code to allow my vb program to scan images of different sizes from a scanner, convert the image to a standard size and store the image as a .jpeg file. If anyone knows how to do this, I'll take my hat off to you.

Saving A Image As JPEG
Does anybody know how to save an image from a picture box as a jpeg file,GIF file or some smaller file formats instead of the bitmap files which are large in size????

How To Resize And Jpeg Image
Yelooooooooooo Expert,

Please I need to resize a jpeg image and save the new image size back to it location in a folder.

Can anybody help me.

Regards

Dayo

Open A Jpeg File
Hi,

How to open a jpeg file from visual basic.it should be opened in imaging software.

Urgent pls..

How Can I Get JPEG Image By Using Active X Control?
How can I get a JPEG image by using Active X Control?

At present, I have no idea about it. Please help me.

Because of Printing problem of Active X, I changed the way.

After Active X running, I want to insert an JPEG or other image

file to web page which is captured Active X Area.

Then I can solve printing problem, I think...^^..?

Somebody help me.

How To Save Image In .jpeg Or .gif Format
I am using SavePicture to save image to file. However, it seem to save only BMP format. How to convert or save image into .jpeg/.gif format.

Image File Paterns (.bmp .jpeg .png)
Hi, I have a program that lets you browse documents to find pictures. It will show all the pictures in the folder you have currently selected, but it only seems to show .bmp images. How could I make it so it could see .jpeg .jpg and .png images types also? I have attached the form I am working with.

Read JPEG Image Into Stream
How do I read a JPEG image as a Stream with VB6?

Resizing An Jpeg Image Using Picture Box
guys i ned help im new in visual basic so i was hoping that your comments and reply or even answer would be for my level. thanks on advance.

i have three(3) Picturebox

Picturebox1
Picturebox2
Picturebox3

what i will do is place a jepg image in picturebox 1 size is 180x76 pixels(for example)

then place another jpeg image in picturebox2 size is 140x80 pixels (for example)

in picturebox3 i wantto show the jpeg image of picturebox2 with the size of picturebox1 (180x76 pixels)


how can this be done?
thanks

Resize A Jpeg Image To 100 X 100 Pixels
i have a program that saves data to a text file and a picture as a bitmap when the save button is clicked but before i can load the picture into the picbox i have to resize it to 100x100 using another pice of software. How would i resize my image when it is loaded to 100x100 (the source image is quite large as it is from a digital camera)

thanks in advance................ RedAngel

Save Image In .jpeg Format
Hi

I have a access table stores pictures in binery format
now i want to store in .jpeg format in hard disk.
Is it possible.. pls help


ASM

HOW TO CONVERT DICOM IMAGE TO JPEG
I NEED TO CONVERT THE DICOM IMAGES INTO JPEG IMAGES USING VB;;
IS THERE ANY POSSIBILITIES IN VB TO DO IT?
IF SO PLEASE REPLY ME..

AND ALSO I NEED IMAGE HANDLING IN VB

PLEASE PROVIDE ANY TIPS IN IMAGE HANDLING IN VB

PLEASE REPLY ME ..

THANK U
BALA

Resizing A JPEG Image File
Does anyone know of a module, COM object, DLL, etc that will take a JPEG file, resize it and write it back out?

I've tried the ImageMagick libraries in C++ but they're horribly complicated, underdocumented and full of bugs it seems. I even tried the PerlMagick libraries which plum didn't work at all.

It'd be nice to have a COM object that does something like this, but I'd be willing to write my own VB object that uses the functions in a precompiled DLL even one of those even exists.

Any help would be appreciated. Thanks.

Need Help With Generating Report W/ Jpeg Image
Hello,

I need help with creating a form with a special jpeg/gif seal. I never done this on Visual C++ or VB. Until now, I created all forms with ansi C++ with HP escape characters to draw lines, boxs, and text. This form will contain boxes which is populated with database information read from a text file.

Since this form contains a special seal on the upper right, I don't think it can be done with old fashion ansi C++. How can I create a form with Visual too and create it as a simple exe to just print the form to a specified printer.

Thanks,

John

Convert Jpeg Image To A Matrix Form
hi guy..i'm new in this forum..istly,sory 4 my broken english..emm i was tasked to design face detection using VB6..i wonder that VB6 is capable to convert grayscale image to a matrix form..if it does,can smebody gve me a code..i also hv to cal the image file from certain dirctory...pleazee help me guy..my due date is almost coming...

Saving Clipboard Data ( Image ) To JPEG
Hello fellows!
I'm trying to save a JPG file from the clipboard data without using any DLLs.
I found this code on another topic:

http://www.pscode.com/vb/scripts/Sho...50065&lngWId=1

It works very well when opening an image from disk and saving it to JPG, but I'm not getting this code to work with clipboard data.
The code when the program fills the data ( that will be saved in the future ) is in this sub:


Code:
Private Sub mnuOpen_Click()
Dim MyPic As StdPicture
Dim FileName As String

FileName = FileDialog(Me, False, "Open Picture File", "Picture Files|*.jpg;*.jpeg;*.gif;*.bmp;*.wmp;*.rle;*.cur;*.ico;*.emf|All Files [*.*]|*.*")
If Len(FileName) > 0 Then
On Error Resume Next
Set MyPic = LoadPicture(FileName)
If Err.Number = 0 Then
Set m_Image = New cImage
m_Image.CopyStdPicture MyPic
If mnuAutosize.Checked Then SetFormSize m_Image
AdjustScrollBars m_Image
Me.Caption = App.Title & " - " & FileTitleOnly(FileName)
mnuSave(0).Enabled = True
Else
MsgBox "Can not load picture file" & vbCrLf & """" & FileName & """", vbExclamation, "File Load Error"
End If
Set MyPic = Nothing
End If

End Sub
As you can see, he loads an image file using LoadPicure() and then passes the result to the m_Image.CopyStdPicture, which receives an StdPicture as an argument. I tried to load the picture this way, but its not working:


Code:
Set MyPic = Clipboard.GetData
It seems that the data from the Clipboard.GetData is in a different format than the data that LoadPicture() returns, so the cImage class cannot "understand". What can I do to get this code to work ( withou using Intel JPG dlls and other ones )?

Thanks a lot!
Fergo

How To Load A JPEG Image In Data Report
Dear Friends,

I have a problem in loading a JPEG/bmp image in Data Report.

Let says, I have a table in MSAccess 2000, and the field are

ProductID ProductName ImageFile
1 ABCD C:ImageImage1.jpg
2 EFG C:DataImage2.jpg

the 'ImageFile' field contains the path of the image file

if I use form object, it is easy to load the image. I just write the code like this :

imgProduct.Picture=LoadPicture(txtImageFile.Text)

Is Anybody know how to LoadPicture in a DataReport and the path of the picture is in a table ?

please help me

How To Save The Picture Image In JPEG Format
Hi Everyone,

am developing a picture in the picture box while run time in Visual Basic.I need to save the picture in JPEG format,am not able to do it..It can be saved in BMP format,but not ion JPEG format..

Anyone knows ple let me know how to save the picture image in JPEG format or converting the BMP format to JPEG format

Thanks
Logeswari

Convert HTML Pages To Jpeg Image
hi,
     i want to convert HTML pages to JPEG image in vb6. so that i can show that jpeg image in listview as thumbnail. Please suggest me the way to converting web pages into images.


Regards

Chetan

How To Convert JPEG Image Into Binary Data?
Hello Professional,

Am tasked to create a VB6 windows based application that converts Images to binarry data and put them in a flat file before sending them to the web server for processing.

My main tasks are to convert this images to binary and put them in a CSV file.

Am hoping someone in here would want to help me out.

However, I wouldn't mind if the help comes in a .NET language as am certain I would be able to convert the codes to VB6

Thank you.

Open, Rotate And Save Picture As JPEG
ok, I want to itegrate rotating pictures function into my fotoalbum program. I want to rotate pictures for 90 degrees of course.

I'm saving JPEG's directly from picturebox with intels JPEG processor.


I'm rotateing pictures using GetDIBits and SetDIBits functions (and using 2 different pictureboxes - I think it was BillSoo's idea).

The problem is, that I can not save a rotated image.



Do you have any other rotating algorithms?

I've attached this project file.

Can I Load A Image File E.g. Jpeg Display In Msgbox?
Hi, how can i load a image file, e.g. jpeg format, display in msgbox ? Thank you.

Saving A Bitmap,Gif Or JPEG Image To An Access 2000 Database
Can somebody help me with this one,

How do you save the contents of the Image Control as an embedded image in an Access 2000 database table, I've tried all weekend and just cannot work it out ?

help !

Zooming Various Size Image To Fixed PictureBox Without Changing The Image Ratio
Yup!I need to scale different size image into a fixed picturebox. Without changing the image height vs width ratio.any of you can help me? thanks.
1)scale the image as big as possible depending the fixed picture box height or width.


I use the loadpicture function in loading picture.
If I use the image control, I found the stretch function will cause the image height and width ratio change.

thanks

(Image Size, Image Adrress, And Creation Time) Of A Process ?
how can I get (Image size, Image Adrress, and Creation time) of a process if I knpw the ID or the handle ?!

thanx,

Use Of Picture Boxes - JPEG Image Content, Zoom And A Design Time Query
I wish to use several large picture boxes to display diagram information which is available from JPEG files on my drive.

1. When I load one of these to the picture box, only the top left corner of the JPEG image appears in the picture box. How may I cause the whole of my JPEG image to be visible?

2. Having achieved that, if it is possible (and surely it is) is it then possible to make the picture box zoom in on a particular section of the image such that it can be examined in much greater detail?

3. Finally, I will have about ten of these large picture boxes all placed on top of each other on my form (so that they can be as large as possible). At run time this is no problem because only one at a time will have its visible property set to true, but is it possible to do something similar at design time such that the lower level picture boxes may be edited. At design time it seems that the last box I have placed on the form always stays on top, hiding those placed previously. It is agreat nuisance to have to drag aside all the later placed boxes in order to get at and work on an earlier one.

Suggestions will be gratefully received.

ca moore

How Can I Figure Out The Size Of An Image File Without Loading The Image?
There might a control or two on the market that do that, but i think they require that the image be loaded as well, so i don't think you'll be able to do that.

How To Size The Image With Picture Box Size?
I use ADO and view the image on the picturebox ("Picture2").Why the image display on the picture box don't have same size with my picturebox?How to make the image display have same size with my picturebox.


Code:

Picture2.Picture = LoadPicture(Pesttable.Fields("PICTURE"))

Image Size To Picturebox Size
how can i make an image the same size as that of the picturebox displaying it.
i.e. stretching it accross the picturebox no matter how small or how big, just stretch it.

Size Window To Image Size
If I load a picture in to a picture box which is in turn on a form, how can I resize the form to the size of the picture once the picture has loaded?

Cheers

John

Conforming Image Size To Picturebox, Not Picturebox To Image Size.
Hello all, i am taking a VB course (Using VB 6) and have run into a little problem.

I need (or want) to have it so users are viewing like... a gallery of the images, on each command button in my frame i have the code
Code: picturebox.picture = loadimage ("imagepath")
(ive run into the issue of running it on another machine and the images not appearing but thats a seperate issue, a seperate topic if i need it eventually)

what ive been able to do is use
picturebox.autosize = true
to make the picture box the size of the image, but thats 4 times as big as the original box and twice as big as my program window (frame?)

ive also tried .scalehight/width but i couldnt get any change with that.

ive searched multiple forums and couldnt find an answer, any help?

thanks in advance

Jpeg -&gt; Binary -&gt; String -&gt; Winsock -&gt; Jpeg
Hello,
I'm making a little program which controls the LPT port, and i've connected a webcam to it.
It save's shots as jpeg files in the appdir.
Now i cant get it to send the jpeg file trough winsock to my client!

this is a little bit of my server code:

VB Code:
...Dim FREEout As Integer        FREEout = FreeFile 'load the image into array to be sent        Open App.Path & " mpout.jpg" For Binary As #FREEout            ReDim DATAout(1 To LOF(FREEout))            Get #FREEout, , DATAout        Close #FREEout        If connected Then        Winsock1.SendData DATAout '"[camstream]" & DATAout & EOP 'send the image array        numSENT = numSENT + 1end if        End If...


and this is a little bit of my client code:


VB Code:
...ElseIf label = "ping" Then        If datar = "request" Then        On Error Resume Next        Winsock1.SendData "[ping]response"        End If        End IfElseEnd IfNext iLoopDim FREEin As IntegerIf bytesTotal > "60" Then    If Dir$(App.Path & " mpin.jpg") <> "" Then Kill App.Path & " mpin.jpg" 'delete old file if it exists    FREEin = FreeFile 'open file to save incoming pic data to    Open App.Path & " mpin.jpg" For Binary As #FREEin        Put #FREEin, , sData    Close #FREEin    numREC = numREC + 1    picIN.Picture = LoadPicture(App.Path & " mpin.jpg")    End IfEnd Sub


but (of course) it wont work.
the picIN picturebox stays grey, the tmpin.jpg image is invalid.
but the tmpout.jpg of the server is valid.

So here is my question:
is there a way to load the tmpout.jpg (the binary bits?) into a string, send it trough winsock with my "label", so the client can recognize the label and convert it back to binary and write the tmpin.jpg?

Image Size From Image Control...
Hi,

Hi, I wrote a simple app that loads an jpg image in an image control, but I need to know what the width and height of the image are... the imagecontrol is set on strectch = true.

Any help would be appreciated.

Thanks

Save JPEG Image With "quality" In GDI+ HELP!!!
hi, all!

I using a GDI+ Wrapper written by Paul (cGDIP.cls, cBitmap.cls, cGraphics.cls, cFont.cls, gdi+.tlb), and i need to save a JPEG image with 30% quality...

How i can to make this? This source - http://www.maurorossi.net/pagine/tips/tips013.htm - is not work.

PLEASE HELP ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

How To Scroll Picture Box Image While Image Size Is Bigger Then Picture Box
Hi

I want to know how to add scroll facility in picture box while image size is bigger then picture box.

Regards
Varun Jain

How To Know Image Size
Hi im here with more questions ,
I have a CommonDialog1.ShowOpen for load a picture(bmp) but and i have a picture box for view this. the picture box have autosize,and have the format on PIXELS, the problem its that i dont want to permit that images more biggers than XLIMIT and YLIMIT have loaded here, and when detects that the image its bigger than the limits x,y sends me a message box saying why!!!
Can anybody help me?
Thanks
Regards

Image Fit Size
hi guys! can you please help in fitting an image into picure box, image should fit exactly to the size of picturebox so that you can see the whole image. here is how i upload my image into picturebox.

Code:
With CommonDialogBox
.Filter = "JPG Files|*.JPG|Bitmaps|*.BMP| GIF Files|*.GIF"
.ShowOpen
Text1.Text = .FileName
gsFileName = Text1.Text

End With

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