Comparing Image From File With Image From Screen
hey, i was wondering if it is possible to look for a special image on my computer screen. i guess it would be similar like the function that looks for a specific color on the screen. anyone know how to make 1 to look for a specific image on the screen? im guessing u can call it image comparison with a specific image from a file or whatever, to an image on the screen.
For example: i take a screenshot of my screen right now, i crop it out so i only have the image "Members List", please remember, its an image, not text. then i want to have the function look for that exact same image on the screen and return a true or false.
ne help?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Comparing An Image To Something On Screen
hi all, i am trying to compare an image to something on screen, like if it sees the winxp start menu picture which i would save into .jpg if it sees that on screen it would perform some code, i know its possible i've seen it done before
Compare Image File With Selected Screen Area
I'm looking to begin making custom applications for poker players, in order to give them details on their cards. I really dont' know where to start with the coding for the images. I need to compare an ImageFile that i have saved with an area within the Poker window.
Any idea on a place to look for help on this or a control or anything would be greatly appreciated. Thanks
Image Comparing
Hi, I need to compare two images. One will be saved on the computer, and one will be captured with a webcam. The method i'm thinking of using is subtracting the pixels of each image from one another, and then making a tolerance. I'm just a beginner using visual basic, and would appreciate any advice on how to accomplish this. I've been searching all over, and I've gotten motion detecting software, but it costs way too much for the application i would be using it for. If anyone know's the routine to perform such a comparison it would be great. Thank you!
Ryan
Image Comparing
hi,
Presently i'm using a web cam to capture an images and after compare the both image by using pixel comparing so as to determine is there any motion detected..
After i develop this program, i found that it is not very stable.
Is there anyone can assists me on other method to compare a image so that it will be able to tell there is motion?
Thank you Very Much !!!
Image Comparing In Vb 6
how can i compare two images in vb6
i had put these code to compare but this is incorrect code to perform it
if image1.picture=image2.picture then
print "Picture match"
else
print "Not Matched"
if two pictures are same but this code gives errornous results.
please tell me appropiate suggestions
coz i m very confused to do this
Save Image From Clipboard To Resized New File Image
Hi,
I'm trying to make screen captures from Acrobat pages, to create thumbnails with.
I'm doing this by:
1. opening the PDDoc of Acrobat
2. Copy the first page to the clipboard
3. Putting the clipboard image in a Picture variable
4. Stretching it with StretchBlt to a new picture
5. Trying to save the new picture
With the code below, the resulting value for retstretch is 0, thus the stretching didn't work. I don't understand my error. The savepicture method results in nothing. I've found several examples of the StretchBlt method, but all with Pictureboxes. I want to do this without a Picturebox. Is this possible? If not, how can I integrate the pictureboxes in my example?
Thanks in advance! Any help is really appreciated.
Code:
Public Sub CreateThumbnail(strFileName As String, Xpixels As Long, Ypixels As Long)
'strFilename = PDF document
'Xpixels = pixel size width
Ypixels = pixel size height
Dim pdfDoc As Acrobat.AcroPDDoc
Dim pdfPage As Acrobat.AcroPDPage
Dim ret As Boolean
Dim pageCount As Long
Dim pdfRectTemp As Object
Dim pdfRect As Acrobat.AcroRect
Dim ClipBoardPic As Picture
Dim pdfPic As New StdPicture
Dim pdfPicWidth As Long
Dim pdfPicHeight As Long
Dim retstretch As Long
' Create the document (Can only create the AcroExch.PDDoc object using late-binding)
Set pdfDoc = CreateObject("AcroExch.PDDoc")
' Open the document
ret = pdfDoc.Open(strFileName)
If ret = False Then
MsgBox "File not found!", vbCritical, "Error"
Exit Sub
End If
' Get the number of pages
pageCount = pdfDoc.GetNumPages()
' Get the first page
Set pdfPage = pdfDoc.AcquirePage(0)
' Get the size of the page
' This is really strange bug/documentation problem
' The PDFRect you get back from GetSize has properties
' x and y, but the PDFRect you have to supply CopyToClipboard
' has left, right, top, bottom
'Set pdfRectTemp = CreateObject("AcroExch.Rect")
Set pdfRectTemp = pdfPage.GetSize
' Create PDFRect to hold dimensions of the page
Set pdfRect = CreateObject("AcroExch.Rect")
pdfRect.Left = 0
pdfRect.Right = pdfRectTemp.x
pdfRect.Top = 0
pdfRect.Bottom = pdfRectTemp.y
' Render to clipboard, scaled by 100 percent (ie. original size)
' Even though we want a smaller image, better for us to scale in VB
' than Acrobat as it would greek out small text
' see http://www.adobe.com/support/techdocs/1dd72.htm
Call pdfPage.CopyToClipboard(pdfRect, 0, 0, 100)
Set ClipBoardPic = Clipboard.GetData(vbCFBitmap)
pdfPicWidth = PixelsToHimetricX(Xpixels) 'Function to convert pixels in HiMetric. Code is not included here
pdfPicHeight = PixelsToHimetricX(Ypixels)
retstretch = StretchBlt(pdfPic.Handle, 0, 0, pdfPicWidth, pdfPicHeight, _
ClipBoardPic.Handle, 0, 0, ClipBoardPic.Width, ClipBoardPic.Height, vbSrcCopy)
SavePicture pdfPic, "c:Temp est.png"
End Sub
Save Image From Clipboard To Resized New File Image
Hi,
I'm trying to make screen captures from Acrobat pages, to create thumbnails with.
I'm doing this by:
1. opening the PDDoc of Acrobat
2. Copy the first page to the clipboard
3. Putting the clipboard image in a Picture variable
4. Stretching it with StretchBlt to a new picture
5. Trying to save the new picture
With the code below, the resulting value for retstretch is 0, thus the stretching didn't work. I don't understand my error. The savepicture method results in nothing. I've found several examples of the StretchBlt method, but all with Pictureboxes. I want to do this without a Picturebox. Is this possible? If not, how can I integrate the pictureboxes in my example?
Thanks in advance! Any help is really appreciated.
Code:Public Sub CreateThumbnail(strFileName As String, Xpixels As Long, Ypixels As Long)
'strFilename = PDF document
'Xpixels = pixel size width
Ypixels = pixel size height
Dim pdfDoc As Acrobat.AcroPDDoc
Dim pdfPage As Acrobat.AcroPDPage
Dim ret As Boolean
Dim pageCount As Long
Dim pdfRectTemp As Object
Dim pdfRect As Acrobat.AcroRect
Dim ClipBoardPic As Picture
Dim pdfPic As New StdPicture
Dim pdfPicWidth As Long
Dim pdfPicHeight As Long
Dim retstretch As Long
' Create the document (Can only create the AcroExch.PDDoc object using late-binding)
Set pdfDoc = CreateObject("AcroExch.PDDoc")
' Open the document
ret = pdfDoc.Open(strFileName)
If ret = False Then
MsgBox "File not found!", vbCritical, "Error"
Exit Sub
End If
' Get the number of pages
pageCount = pdfDoc.GetNumPages()
' Get the first page
Set pdfPage = pdfDoc.AcquirePage(0)
' Get the size of the page
' This is really strange bug/documentation problem
' The PDFRect you get back from GetSize has properties
' x and y, but the PDFRect you have to supply CopyToClipboard
' has left, right, top, bottom
'Set pdfRectTemp = CreateObject("AcroExch.Rect")
Set pdfRectTemp = pdfPage.GetSize
' Create PDFRect to hold dimensions of the page
Set pdfRect = CreateObject("AcroExch.Rect")
pdfRect.Left = 0
pdfRect.Right = pdfRectTemp.x
pdfRect.Top = 0
pdfRect.Bottom = pdfRectTemp.y
' Render to clipboard, scaled by 100 percent (ie. original size)
' Even though we want a smaller image, better for us to scale in VB
' than Acrobat as it would greek out small text
' see http://www.adobe.com/support/techdocs/1dd72.htm
Call pdfPage.CopyToClipboard(pdfRect, 0, 0, 100)
Set ClipBoardPic = Clipboard.GetData(vbCFBitmap)
pdfPicWidth = PixelsToHimetricX(Xpixels) 'Function to convert pixels in HiMetric. Code is not included here
pdfPicHeight = PixelsToHimetricX(Ypixels)
retstretch = StretchBlt(pdfPic.Handle, 0, 0, pdfPicWidth, pdfPicHeight, _
ClipBoardPic.Handle, 0, 0, ClipBoardPic.Width, ClipBoardPic.Height, vbSrcCopy)
SavePicture pdfPic, "c:Temp est.png"
End Sub
Edited by - DoLoop on 5/30/2008 6:07:25 AM
Inserting PDF File Image Into A Image Field In SQL Server
I need to insert the pdf binary file into a field in a SQL Server 2000 table. The field is an image type. I currently use the Atalasoft Image OCX to upload tif and jpg images to the table, but it does not support PDF formats. I need a 3rd party OCX that will allow me to load the image via AppendChunk and then also read it with GetChunk. I am also looking for the control to possibly get me thumbnails of the pages.
Reading Data From A Image File And Then Creating A New Image
hi ,
i am trying to create an application which reads a image file (JPEG, BMP etc.) and then create a new image file by writing the read information into the newly created file.
but the newly created file is not a image file though i have given the extension as .GIF which is same as original image.
this is the code what i have written to read from a image file and then
trying to create a new image file.
' reading from a image file and storing the data into a variable. fso is a file system control and objFile is file control
dim fileContent as variant
temp="sun ree.gif"
filelength = fso.filelen(temp)
Objfile.Open temp, fsModeBinary
While Not Objfile.EOF
fileContent = Objfile.InputB(filelength)
Wend
Objfile.Close
' creating a new image file
Objfile.Open "sun est.gif", fsModeBinary, fsAccessWrite
Objfile.Put (fileContent)
Objfile.Close
will any one please help in this matter
thanks,
sunil
Can't Get Image Admin, Image Edit, Image Scan To Work
Hi Guys,
Every time I go to add components and add the Kodak IMG components it tells me each one cannot be loaded.
I did have it working and then when I re-loaded my project it told me that 'ImgAdmin could not be loaded' and the same with ImgEdit.....'Do you wish to continue loading project anyway'.
Please can you help?...I am in real nead for them to work.
Much thanks,
Peter.
Loading Image Into Image File
hey everyone,
i have a bit of an issue regarding some coding I am trying to do. Let me paste in here what needs to be done and if anyone can help that would be greatly appreciated.
Thanks
"In the click event of the second button, allow the user to select an image, then load that image into the image control, and also add the file name (not the full path, just the file name) to the listbox. So,
Set the Filter property to display these file types: bmp, ico and any other image file type you want. (P. 524 of the text).
When they select an image, use the LoadPicture function to display it in the image control.
Display just the file name (do not include the full path) in the listbox. You will need to do some string manipulation to do this. You will need to find the last character. To make it easier, look up the InStrRev function."
How Do I Convert BMP Image To JPG Image(not A File)
I want to convert a picture image (that comes from my webcam) to a JPG image before sending the image as a byte array via LAN to an image box in another computer (not a FILE).
I want JPG because it is much smaller and quicker.
All the DLL's I have found only save it as a file which is no good to me.
Maybe there is a 2 step way of creating a 'virtual file' using Filescripting?
Or I could use a ramdisk and immediately read it to a pic box but that is cludgy.
I would much rather be able to CONVERT straight to a JPG IMAGE before sending.
How Do You Save An Image From The Screen
I want to be able to Draw an Image on the screen and save that image to an BMP file. and then to do away with the code I used to make the image on the
screen. I want to use the Bmp Image in my program(Redisplay it) Dark Basic had comands Like GetImage and SaveImage and ShowImage/ What commands can I use in VB4 to accomplish these tasks?
Image Pop Up On Loading Screen
you know when u open some programs, they have like a title screen that opens for a couple seconds before the program actually opens? I think vb has one too. It's just an image with no handles that appears in the middle of the screen for a few seconds and then goes away. anyone know how to make it?
Send Screen Image
Okay, I made an instant messenger system. But now I would like to add some professional functions.
In my first step I would like to add a function that allows you to share your screen with other users.
How can I make a fast image of the screen and sent it as fast as possible ? So other people can follow what I'm doing on my pc.
Any advice ?
Thanks
Help!! Moving An Image On The Screen
I am wanting to do it so when someone clicks on and image they can move it any where on the screen,and when they release the button the picture stays in that location...
Finding An Image On The Screen
I need to have my program search the screen, on another app, for a certain immage, then give the x,y coordinates of where that immage is. This task is a bit too hard for me, so I thought I would ask you before taking a 4 year college course on vb
Can anyone help me?
Image Floating On Screen.
I had an image box in the excel sheet. When I start to scroll the worksheet down, the the image will move together and eventually the image will be out of view. Unless I scroll the worksheet up again then the image will appear again.
What I'm trying to is to have the image box always in viewed even when I start to scroll the worksheet. (i.e the image box will always stay on the same spot on the screen when I scroll the worksheet)
Can thisbe done?
pls help..........
Screen Capture + Saveing Image
How to take a screen capture of desktop, put in a picturebox but not in real size..i want to resize picture..for example : if a have a pic box 50x50 then my screen capture pic is 50x50...and how do i save that "small" pic ? i hope somebody will know!
Splash Screen Problem With Image
Does anyone know how to make an image, the background of a splash screen because i try to send it to the back so that all the text is infront of it but it wont work. Thanks for any help!
Display Image In Center Of Screen
Hi guys. I have coded in Visual Basic 6 for about 3 or 4 months. That was over a year ago. So I guess you could say I'm rusty.
Anyway, in one of my applications that I am building, I ned to display an image in the center of the screen. Say my application had one form. The user would click command1 (the button) and an image would appear in the center of the screen. The user could minimize or move the form around, but the image would still stay in the same spot, the center of the screen. If you minimize or move the form, the image would still stay in the center of my display and still be visible. In other words, the iamge needs to be "not mounted" or "detached" from my form. Anyway I hope some of you VB gurus can help me out here. I'd appreciate it.
<EDIT>
Oh, and by the way, I forgot to mention that the image needs to stay on top of any other application that may be running.
</EDIT>
Mirror-image Of Screen Display?
Is there a way to reverse the screen? I still want the computer to operate normally, only with the screen displaying a mirror-image of the normal screen.
Thanks!
How To Open An Image In Another Form And Fit To Screen
hello guys,im a newbie in vb6 help me pls..?
i want to open an image and stretch it in another form.
ex.(on form1) if i click the image on the image_click ,i want it to open in other form (form2)and stretch it...what code will i use?
thanks
Displaying Screen Saver Or Image
Guyz,
I would like to ask if Is it possible for VB to display Image or ScreenSaver on a another PC in a LAN network? If yes then how? I would like to create an application that when a timer reach a target time then it would display something in the other PC, because im working in an internet cafe.
Thanks
Howard
Scan The Screen For Matching Image
Is it possible to scan the entire screen thats open (including apps) for a matching image of one you've stored previously as a bmp. Any tips or somewhere to start would be brilliant.
Cheers
Andy
Getting Still Image Preview Of Screen Saver
I'm looking for a way to let my users preview a screen saver (.scr) without having to run it;
I can show in preview modes many screen savers simultaneously but i would like to have a still imaeg instead, any hint ?
Here's how I get it to work right now but i'ts quite inneficient.
Code:
Private Sub Form_Load()
pid = Shell("c:ss3dfo.scr /p " & Picture2.hWnd)
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
phnd = OpenProcess(PROCESS_TERMINATE, 0, pid)
If phnd <> 0 Then
' We now are able to close the process by phnd
BitBlt p5.hDC, 0, 0, 1000, 1000, Picture2.hDC, 0, 0, vbSrcCopy
Call TerminateProcess(phnd, 0)
Call CloseHandle(phnd) 'Clean up after ourselves
End If
Timer1.Enabled = False
End Sub
Please help me to get it right =)
Need Screen Capture As Image, Not Object
I can capture a screen shot with no problem (this is manually, not with VB code), but I can't seem to figure out how to save it as anything other than a Microsoft Object. That is, I can embed it in MS office files with no problem, but I need to save it as an image. BMP or JPG or most anything.
Any help appreciated.
Displaying Print Screen Image....
i want to do something probably really simple. capture the screen with send keys {PRTSC} and then display it on the form ? can anyone help me with this.
Setup / Startup Screen Image
In all my programs I have installed on my pc, almost all of them have some sort of splash screen with an image on them that lasts while the program loads. The only way I can figure out how to do this is to create a form that loads up initially with some kind of timer on it but I was wondering if there is some kind of installer creation program that I can do this in? Oh, and how do I assign an icon to my exe file? Thanks!
How To Display Full Screen Image.
In my VB application I need to display full screen images, one at the time. Only image should be visible, nothing else.
Is this possible? How to do that?
Unfortunately, I'm not a programmer. A short sample will help me a lot.
Thanks in advance.
Sasha
Please reply to shkolns@attbi.com
Capture Image On Screen Periodically
Hi there,
Is there a way for to periodically capture a picture of the screen during runtime & save it to a file? Kinda like the same way the printscreen method works, only that copies it to the clipboard.
Many thanx
Capturing A Screen Image From An External App
Hi,
I use IBM client access to write programs on a remote server. I need to save my screen image for user documentation. I can purchase software that will capture the screen image or what's been cut and save this as an image file.
Is it possible to create an application that can "Ghost" an image of what is selected on the screen.
If this is possible in VB any pointers would be as always appreciated.
cheers
Chris
Putting An Image On The Screen Using BitBlt (VB6)
Hi there,
I have been trying to put an image on the screen using BitBlt, and it worked fine. Then, I tried to do the same thing, but without a picturebox. I used the LoadImage Win32 API function to accomplish this, and, again, it worked fine. But, as far as I know, this function only works for BMP files, but I want to put JPG's on the screen. I tried to put the JPG file on the screen with LoadImage, but it didn't work. Is there some other way to open JPG files in a DC (Not using a Picturebox) and put them on the screen using BitBlt (Or maybe some other function of which I haven't heard)? Thankies.
Smooth Image Movement Accross Screen.
How do i get an image to move smoothly accross the creen wehn a button is clicked? I will prob need to get about 3 going across eventually.
I have previously used timers but didn't like um much.
I have also tried to bodge together a loop, it worked but it was a bit long winded, dont think it was the best way to do it, i was just guessing really. I am new to loops
I have seen someone use a combination of timers and loops (loop inside a timer), it worked pretty well i think.
So any ideas?
Splash Screen And Image Control Problem
I have a VB6 form that starts up in middle of screen. The scale mode is "1
twip" and the scale height is 4965 and scale width is 6510. The height of
the form is 4965 and the width is 6510.
I also have an image control overlaying the entire form. It's height is 4965
and width is 6510.
The bmp image that is within the image control is 434 pixels wide and 331 pixels high. Displaying properties on this image via Explorer shows it is using 71 DPI for width/height.
The image displays fine on my PC and any PC that is using a 96 DPI size
font.
On some laptops with wide screens, it would appear that Dell sets the font
to 120 DPI.
The problem is, my form is now larger than my image, and looks very tacky
when it appears. Again, on a normal desktop with a 96 DPI font, the form
and image are exactly the same size.
How do I adjust my form with/height to account for the difference in DPI
without having to adjust or stretch my image?
Any sample code or explanations would be appreciated.
Resizing An Image Based On Screen Resolution
Hi,
The main form in my program will display an image that takes up the whole form. The form itself takes up the whole screen. I know how to get the screen resolution and how to resize the form accordingly.
How would I resize the image to fit the form based on screen resolution?
Thanks.
GetDIBits, BitBlt? Finding An Image On The Screen.
Hi,
I'm trying to search the screen for a set bmp, basically I want to scan the screen until it finds a certain image, then return the coordinates of the image. I'm just not sure what the most appropriate or effective way of doing this is.
For instance, I have a picture of a Directory Icon. I want to be able to scan the screen, say on the desktop and it return the location of where it found the image.
Any theories or examples etc are much appreciated.
Cheers
Resetting Image Position When It Reaches End Of The Screen?
I was wondering how I would reset the images position to 0 when it reaches the edge of the screen. I tried this:
VB Code:
If bomb_yellow.Left = 3480 Thenbomb_yellow.Left = 0End If
3840 is the furthest position on the screen. Am I on the right track even?
Screen Capture For Image When Console Is Locked...
I am currently attempting to screen capture the contents of a Form (with a PictureBox object in it) while the console is locked or turned off. This is necessary due to automated processing.
The problem is, standard BitBlt won't copy the bits of the image, because when the image is 'off-screen' there are no bits to BitBlt. My understanding is that the device context for the Form is empty when the Form isn't being drawn to the screen. So, what I would need to do is to paint the form in memory and hand that DC off to the BitBlt... but how do I paint the form in a memory DC, instead of a Form DC?
Thanks!
|