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




Comparing Picture1.Picture To Picture2.Picture Not Working?


I have two picture boxes on a form. Picture1 & Picture2. I want to compare if the pictures are the same.

I am using:

IF Picture1.Picture <> Picture2.Picture THEN
' STuff here
END IF


It doesn't seem to work. It always thinks they are different even though they are not (they are loaded from the same source file).

There must be a routine or something else I can do to compare them quickly and easily?

J




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Picture1.picture = Picture2.picture
I would like to set a captured image to a picture box without using the clipboard. When I get the image using Temp = SendMessage(hwndc, WM_CAP_EDIT_COPY, 1, 0) it displays in the picture box but I can’t copy it to another picture box using picture2.picture = picture1.picture. Can anyone see what I not doing right?

The code I have works. This is "Sample code" of the capture to the picture box.

Dim getImage As New ProcessImage

Private Sub tmrDelay_Timer()
tmrDelay.Enabled = False
Call getImage.CheckImage(Picture1)
tmrDelay.Enabled = True
End Sub

Public Sub CheckImage(singleImage As PictureBox)
Dim hwndc As Long
Dim Temp As Long
Temp = SendMessageAsLong(hwndc, WM_CAP_GRAB_shpFrame, 0&, 0&)
Temp = SendMessage(hwndc, WM_CAP_EDIT_COPY, 1, 0)
Picture1.Picture = Clipboard.GetData
End Sub

Me.Sections(1).Controls(1).Picture = Form1.picture1.Picture ===&gt; Error Need Help
Me.Sections(1).Controls(1).Picture = form1.picture1.Picture

I want to use picture in form1 and show in datareport but
when run datareport it warn me following
"Object doesn't support properties or method"

Best Regards

Assing Picture1.Picture To Image1.Picture
Hi,

Is it possible to assign the Picture property of a picturebox to the
Picture property of an image control?

I use an invisble picturebox to make some changes to a picture, but I
want to show the picture in an imagecontrol, since the image is very
large and I want to stretch it.

But when I execute the following code:

Image1.Picture = Picture1.Picture
Image1.Refresh

The image control Image1 stays empty. What am I doing wrong?

Thanks in advance,
Sandra

Picture1 = Picture2?
Hello, this code can movable image , but I can not success if Picture1 what image. Picture3 what image.

where missing ?


You can try use mouse moveable Picture1, but if moveable Picture1, Pictre3 can not imm. show new image.

Or same of adobe photoshop, Main window, but right top small window,
if select area , that small window can imm show that select area (1% to 1000%).


hope you understand.


Please!




Code:
Dim StartX As Single, StartY As Single

Private Sub Command1_Click()
Unload Me

End Sub


Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
StartX = X
StartY = Y
Picture1.AutoRedraw = False
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Picture1.Left = IIf(X < StartX, Picture1.Left - (StartX - X), Picture1.Left + (X - StartX))
Picture1.Top = IIf(Y < StartY, Picture1.Top - (StartY - Y), Picture1.Top + (Y - StartY))
Picture1.PaintPicture Picture2.Image, 0, 0, Picture1.Width, Picture1.Height, Picture1.Left, Picture1.Top, _
Picture1.Width, Picture1.Height
Picture1.Line (1, 1)-(Picture1.Width - 1, Picture1.Height - 1), , B
End If
End Sub

Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.AutoRedraw = True


End Sub

Puzzled: Send Hdc Data Of A Picturebox To Picture2.picture
Alright,
This has puzzled me for well over a week, and I am simply at a loss. I have a picture box (picture1), that has an image in its hdc. Now, I'd like to send this picture in the hdc to another picture box (picture2), so I can then, for example do:

savepicuture picture2.picture, "c:asdf.bmp"

Now here's where it gets trickier. Picture1, where the hdc is stored, is not visible...

You can see the attached project my attempt to figure this out by clicking on the command button. Please help!

Picture1.Picture = Picture1.Image!!!
Hi,

Picture1.Picture = Picture1.Image

this statement was very useful for API and some other techniques,
it ran well under Win95, but it has strange behavior under Win98,
the entire graphics jumps on Y-axis about 1 pixels

does someone know what exactly going on !?!?!

thanks in advance

Picture1.Picture = Picture1.Image!!!
Hi,

Picture1.Picture = Picture1.Image

this statement was very useful for API and some other techniques,
it ran well under Win95, but it has strange behavior under Win98,
the entire graphics jumps on Y-axis about 1 pixels

does someone know what exactly going on !?!?!

thanks in advance

Puzzled: Send Hwnd Data Of A Picturebox To Picture2.picture (UNRESOLVED)
Alright,
This has puzzled me for well over a week, and I am simply at a loss. I have a picture box (picture1), that has an image in its hwnd. Now, I'd like to send this picture in the hwnd to another picture box, so I can then, for example do:
Code:
savepicuture picture2.picture, "c:asdf.bmp"


Now here's where it gets trickier. Picture1, where the hwnd is stored, is not visible...

Please get back to me on this!



Edited by - Marce22 on 2/12/2005 11:30:44 AM

If Picture1.picture
I have this (example):


VB Code:
"if picture1.picture = (app.path & "picturename.jpg") then


but it doesn't work and brings up "type mismatch" as an error. I tried it without the brackets and it didn't work. What can i do to make it work?

SavePicture Picture1.Picture?
Hi All

I've got a slight problem with the SavePicture function, I have made a simple Graph drawing program in VB, it uses the line and PSet functions to draw the coordinates. It works real good, but I can't save the graph. My code for saving

Code:
SavePicture Graph.Picture, "C: emp.bmp"
This says Invalid picture, and when I hover my mouse above the Graph.Picture part, it says Graph.Picture = "0"... Can someone tell me how I can save my Graph???

Kalkran

PS Hope I gave all the info necessary to solve my problem

Picture1.picture.Width = Not Correct Value
I need to get the correct size of an image in pixels.

I have a picturebox which contains an image.

The original image size in pixels is w=96, h=150

But

Code:
MsgBox Picture1.Image.Width = 2672
MsgBox Picture1.ScaleX(Picture1.Image.Width, vbTwips,vbPixels) = 178.1333


I cant seem to get the Correct value...

Any Ideas ??

Save Picture1.picture As File
plz how can i save contents of a picture/image control(ie its picture property) as a file(maybe bmp,ico,gif or jpg).any APIs?
dayonikan

URGENT! Change Picture1.picture
I have pixtrue box Picture1, how do I change the picture displayed in it.

I figured it was just picture1.picture = **Picture Location.


WHAT IS IT !

Thanks for any help anyone can give.

How Do U Open A Picture Nito Picture1
Hi

    How do i open a TGA file format and display it and then save it in a differnt format like jpeg or bmp.


i managed to oepn jpg and bmp but i i get a message saying "invalid picture" when i try and open a TGA

Hillo?Can Anyone Tell Me How Can I Drag Picture2 In Picture2(Picture2 Is The Holder O
I wanna make a process bar just as Winamp.But I can realize it.

Reduce Saveimage Picture1.picture Quality
is there anyway to reduce the quality of a picture i have saved using


Code:
SavePicture Picture1.Image, Path

or any other way to reduce the file size

Loading Picture1.picture Into A Stream Object
Hi people, i have a picture in a picture box (vb6) and i'm trying to save it into a sql2k database.

I have been trying to use the stream object but i always receive an error when i try to load the picture into the stream. Neither "write" or "loadfromfile" work...

I know that loadfromfile will only accept a file's path and not pic1.Picture for example. So does stream have another method to load pic1.Picture, or probably is there a way to "savetodisk" pic1.Picture so that then i can use loadfromfile?

Please help!

Winston

Checking Picture1.Picture Values In If Statements
Hello, I've recently come a long a problem while making a connect 4 game. Here's the code


VB Code:
'the if statement is in a for loop, don't mind the iIf Picture1(i).Picture = App.Path & "" & color & ".bmp" Then.......end if


Now when I try to compare the two, I get a type mismatch error, as the value output by picture1(i).picture isn't a string but an eight digit number, an octal number. Is there a way to convert the App.Path & "" & color & ".bmp" to octal or something. I haven't seen a COct() function or anything.

Anyone's help would be greatly appreciated!

Ryan

Picture1.picture.height And Width Problem
after I bitlbt an image to a picturebox and try to resize the picture box to the dimensions of the picture, it doesnt work perfectly. Can anyone help me?

Screen.MouseIcon = Picture1.picture; Doesn't Assign . Any Clues ?
Form with PictureBox Control with small .BMP assigned to Picture1.Picture

screen.mousepointer = 99
screen.mouseicon = Picture1.Picture





Causes a wrong property assignment error
although the VB Help states this syntax.
It only works if Picture1.picture is an .ico file and not a .BMP.


Am I missing something ?

R:- ( ..................................

Copy 2 Pics With Bitblt In Picture1 -&gt; OK -&gt; BUT: How Can I Copy Picure1 To Picture2
Hi !

Copy 2 Pics with Bitblt in Picture1 -> OK This works fine !

BUT:

How can I copy Picure1 to Picture2 ?

I know that Picture2.Picture = Pictrue1.Pictrue will never work because of Bitblt. But how can I copy Picture1 to Picture2 that "Picture3.Picture = Pictrue2.Pictrue" would work ?

Thx 8)



/Edit: Short explain: I want to save the Picture1 created by Bitbld in an ImageList1... *g*

Picture Comparing...
hi, i just seen something to do with comparing fingerprint pictures...

is there a way to do something like

if picture1.picture = picture2.picure then etc etc (i know that wont work just gives you an idea)

is it possible to turn a picture into text?

thanks

Comparing Picture...
Hi,

I am making an app in which I am storing 50 pictures in database and on the GUI I have a picture box and 2 command button...

When user clicks the command button open file dialogue comes up and asks user to locate a picture file from the HDD...

After that when user clicks another command button and then it should compare that uploaded picture with a pictures in database...if they are same then tell the user that the picture is already there...

Any idea...

Cheers...

Comparing To Picture
Hi I try to compare 2 picture box but I can't find any help on msdn or Vbsquare. I give an example
if Pictry(0).Picture = Picresult(0).Picture Then
'what to do....
endif
I've try with datafield, is, and many thing... Nothing seem to work. Does I need some cofee or I'm just blind?
Thank you!
Merlin

Capture Entire Picture Of Picture Box Though Picture Exceeds Screen Height
please give me details how to capture entire portion of picture in a picture box control though the picture height is greater than the screen height.

Comparing Window To Picture
Hello everybody,

I'm trying to create a program that can determine if a selected image is currently viewable within an outside application. I'm using VB6 at the moment, but I have access to .NET as well.

What I've been doing so far is grabbing the handle from a window by using the EnumWindows API and then grabbing the device context by using the GetDC API with the just-grabbed handle.

Then using GetPixel, I've been trying to get pixel by pixel from each picture and comparing to see if they're the same color.

Few problems, from most to least important.
1. the pixels from the grabbed window are coming out as black. For testing, I tried using StretchBlt to paste the window into a PictureBox...this works. I can then use GetPixel successfully. I do not want to have to do this for the program.

2. I can't get graphics information from the grabbed window if the window is minimized. This might be unavoidable, but thought I'd throw it out here.

3. This method is kinda slow. Faster suggestions are welcome.

Any advice would be appreciated. If you want clarification or code snippets let me know. Thanks in advance!

Comparing Picture Boxes
i have 2 picture boxes.

i would it make it so when the 1st picture box has EXACTLY the same picture as the other one it does somthing, but it dosn't seem to work. this is what i have in there now that does not work... am i on the right track?.....


Code:
If PicCapture.Picture = PicFish.Picture Then
lblYAY = lblYAY.Caption + 1
End If



if you know how to do this, please help me

--redcrusher

Comparing Picture Boxes With .tag Function
Hello, I'm trying to get two picture boxes to be able to be matched by using the .tag value. But I can't get it to work what is the correct way of doing this?

Load Picture At Run Tme In Picture Property Of StatusBar_Panel(1).Picture
I am trying to load an picture at run time at every Form's
StatusBarPanelPicture property but it seems that it doesn't show up .
Any ideas?
Thanks Panayiotis.
Public Sub main_logo_load()
    On Error GoTo Load_Other
    'Connections.Arr(1) array field holds the driveletter to which I have
the folder located .
     Set Forms.Controls("staMain").Panels.Item(1).Picture = _
        Connections.Arr(1) & ":CharterManagerImagesLogo-Small.gif"
     'Forms.Controls.staMain.Panels.Item(1).Picture = LoadResPicture(1, 1)
Load_Other:
    If Err.Number = 53 Then
       Set Forms.Controls("staMain").Panels.Item(1).Picture =
LoadResPicture(10, vbResBitmap)
    End If
End Sub

 

SOS On The Picture1.picture I Dont Know How To End It And I Dont Know What Is Wrong
Dim path2 As String
Dim i As Long


Private Sub File1_Click()
Picture1.Picture = LoadPicture(File1.path & File1.List(File1.ListIndex))
End Sub

Private Sub Form_Load()
path2 = "C:Program FilesAmerica Online 7.0bdownloadRamah LTI"
File1.path = path2
End Sub



Private Sub Picture1_Click()
Picture1.Picture =
End Sub

Private Sub Timer1_Timer()
i = i + 1
If i = File1.ListCount Then i = 0
If condition Then
i = 0
End If
End Sub




(I dont know whats wrong im not sure what to put iun the "picture1.picture=" or what the load picture for the timer should be id really appreciate the help thanx..im making a screen saver proj for yr book this hsould be pretty easy im just not very good lol

Picture1.left = Picture.left - 200
I would like some help, when i do this with my code, i always get this black sort of flash across the page every time the graphic moves... do you know how to get rid of this? Thanks!

Heres the code i used.

Private Sub Timer1_Timer()
burns.Left = burns.Left - 500
Timer1.Enabled = False
Timer2.Enabled = True
End Sub

Private Sub Timer2_Timer()
burns.Left = burns.Left + 500
Timer2.Enabled = False
Timer1.Enabled = True
End Sub

Thanks Again

Working With Links And Picture Boxes?
Here's what I need to accomplish: Take the image in a picture box, move it out of the picture box into a folder, then rename it (I can rename the file) to a .lnk, and then set the target of this lnk. Any suggestions. Thanks for any help, I know I am asking alot.

How Can I Load A Picture In A Picture Box To A Image's Picture
hi all!
i have a picture box, in that picture box, there is a picture asume it as "pic1.bmp".. now i have made some changes in that picture.

Now i want to load a picture to a image( my form consists of a picture box and a image also).

like image1.picture=loadPicture(picture1.picture) ...

but i know that this statement is invalid....

how can i do it? actually.. yesterday i learned how to make changes on a picture and how to save a picture as .bmp..

so i can do one thing like save the modified picture box as .bmp and can load that .bmp into my image....

suppose if i do.. like this.. i need to change my entire code... since in my real application my images are controll array.. and its better to load the pictures from picturebox control array to this image controll array....

is there any posibility of doing like this.... if so kindly help me...

Thanks in advance..
regards:
raghunadhs.

Making A Picture Fit The Picture Box Instead Of The Box Fitting The Picture.
Hello,

I was wondering if anyone could tell me how to make a picture fit the picture box instead of the box fitting the picture. So I would want the picture to get smaller like the image preview on windows xp, when you click once on a pic and it shows the details and a small form preview of the pic yet not disformed (i.e NOT STRECHED)

Can someone show me how to do this?

Thank you and have a great day!
Stilekid007

Urgent- Picture On Picture Or Text On Picture
how can i open a picture add text or another small picture on top of it and then save it
for instance i have a lot of pictures and i want my name to be on them

Picture Autosize Not Working. (Due To Other Functions On Form)
Hello,

Can someone please tell me why the attached program's auto size picture box does not work?

I just need to know what code is doing it.

Thank you!
Stilekid007

Custom Control With Picture Property (Semi-Working)
Hi...

I have created a custom control with a picture property and I'm using property Get and Set in conjuction with Read and Write properties to keep the pictures.

However, after assigning a picture to the control, everithing works fine excep that when I select my control (in a form) in the properties window it says (none) in front of "Picture".

If I assign a picture to a form it says "(Bitmap)"... Am I missing something? Or is this the way t works for user control?

Thanks

How To Get BLOB Picture Working With Long Binary Data?
I'm having a difficult time on figuring out how to get the BLOB field to display a picture when a Data1 control is used to store the images in VB6 because they are converted to Long Binary Data type into Access 2000 database. It automatically updates the database with the images with no programming involved.

I'm using CR8, by the way.

I saw that there is also a filename field but even that won't work because the BLOB field requires an actual image to work.

Hello, by the way.

My first time here! I've tried many forums like dForums but seems like it's a ghost place?! I was even amazed that I had already registered there almost 2 years ago and realized they never responded to my posts! They still haven't and it's been 2 weeks.

I have tons more questions but I'll start with this one.

Thanks,
Mel

EDITED: Wanted to explain exactly what kind of control was used to store the images!



Edited by - iammine on 1/4/2006 5:48:39 PM

Scale A Picture To Fit In A Picture Box And Maintain Height To Width Ratio?
I am writing a program where I would like to allow the user to load pictures into a data record, and these would be displayable by a picture box on the form showing the record. The problem I have is that if the picture is too big, it is clipped, and if I use an image with the stretch method, I risk having the picture distorted as the Height to Width ratio could then be altered by the code. I'd like a way to scale a picture to fit in the picture box, while maintaining the Height to Width ratio. Any suggestions?

Pegasus37

Code To Place A User Selected Picture As The Background Picture
This is an odd request. My company (in its infinite wisdom) has decided to automatically place the company logo as the background picture at network logon.

I'd like to write a little VB program that I could put in the Startup folder that would replace that with my selected picture automatically.

Any ideas on how to access the Windows Background property? Thanks.

Nate

List Box Selected/picture Box/radio Buttons To Flip Picture
If I have a list of say 50 text items dumped as an array in the list box, and clicking on 1 item brings up a picture in a picture box, and there are two radio buttons next to the picture, one default with the list selection text(no change), but the other one, when clicked, brings up a different picture; in other words, once the selection is made in the list box, is it possible to flip between images with the radio buttons.

I would have done it with Select Case, but that means having the full list of items in the list box in the code of the radio button. Is there a better way?

How Do You Print Screen Then Load That Picture Into The Form.picture Property?
This is something that I've been trying to do for ages, but I've never had any success- Does anyone know how to print screen with code and then load that picture onto a form? I've got most of my program written, but I can't figure how to load a picture from the clipboard onto my form. I have a SendKeys to send a print screen keypress, but I don't know if it works properly. Can anyone help me?
Thanks


Now, don't get me wrong, 'cause baseball's a great sport.
It teaches little children simple eye-hand coordination with little effort or exhaustion.

 -byufan

Stretching/Shrinking A Picture In The Picture Property Of An MDI Form
I believe I saw this somewhere but I can't remember where...

So, If I place a bmp picture in the picture property, how can I get it to automatically resize to same size of the MDI Form?

Copy Portion Of A Picture To Another Area In Same Picture Object
Let's say I have a Picturebox with with one or more pictures in it (like a single column of pictures aligned one on top of the other) and I want to go into the picturebox at a certain x an y and for a certain w and h and copy that area to the same picturebox at a different x and y. How do I do this? Can I use PaintPicture?

How Make Image Picture = Picture Drawed In Picturebox
hi i need some help here friends

how can i make image.picture = drawed picturebox

this is my example


Code:
Option Explicit

Const DI_MASK = &H1
Const DI_IMAGE = &H2
Const DI_NORMAL = DI_MASK Or DI_IMAGE
Private Declare Function ExtractAssociatedIcon Lib "shell32.dll" Alias "ExtractAssociatedIconA" (ByVal hInst As Long, ByVal lpIconPath As String, lpiIcon As Long) As Long
Private Declare Function DrawIconEx Lib "user32.dll" (ByVal hdc As Long, ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long
Private Declare Function DestroyIcon Lib "user32.dll" (ByVal hIcon As Long) As Long


Private Sub Command1_Click()
Dim hIconHandle As Long
Dim sPath As String
sPath = (App.Path + "" + "1.txt")
hIconHandle = ExtractAssociatedIcon(Me.hWnd, sPath, 0)
p.Cls
If hIconHandle Then
Dim div As Long
p.ScaleMode = vbPixels
div = Screen.TwipsPerPixelX
ScaleMode = p
DrawIconEx p.hdc, 0, 0, hIconHandle, p.Width / div, p.Height / div, 0, 0, DI_NORMAL
DestroyIcon hIconHandle

End If
Exit Sub

Image1.Picture = p.Picture

End Sub


it did not work for image
Image1.Picture = p.Picture


thanks alot

Common Dialog: Import A Picture File Into Picture Box?
I have Picture1 (picture box) and dlgFilePath (common dialog control).

I need the user to be able to browse through his/her computer and find a picture file, which I need a filter for. I know I've done this before, but in a computer transfer, I lost the files, so I'm kinda rusty...

How would I pull that off?

Set the filter, say, for *.bmp, *.jpg, *.gif, *.png files.

I know I need a

Picture1.Picture = FilePath

at the end of all of it to import it... and then I need to change the picture box size to perfectly match the picture...


Thanks in advance!

How To Save Picture Which Is Displayed In Picture Box Or Image Control
Hi all,

I have one picture in picture box or image Control now i want to save to that picture as .bmp 0r .imp or .jpg or any other formate
how to do that.
There are any other controls which can give me the option to save the picture

thanks

Pic1.Picture = Pic2.Picture Want To Stop It Flashing!
I have 2 pictures, which I have attached. When I user clicks on the view button on my form then another picture, pic3, is set to either pic1 or pic2 alternately.
The problem is that when this happens there is a green flash where the picture is...something to do with the graphics inverting...
The code for this is:

VB Code:
Option Explicit Public Enum ViewStyle    Front = -1    Rear = 0End Enum Private menmView    As ViewStyle Public Property Let View(ByVal Value As ViewStyle)    menmView = Value    LockWindowUpdate UserControl.hwnd    If Value = Front Then        capView.Caption = "Front"        imgWafer.Picture = imgFront.Picture    Else        capView.Caption = "Rear"        imgWafer.Picture = imgRear.Picture    End If    LockWindowUpdate FalseEnd Property Public Property Get View() As ViewStyle    View = menmViewEnd Property Private Sub capView_Click()    View = Not ViewEnd Sub Private Sub UserControl_Initialize()    View = FrontEnd Sub

I try and lock down the update, but it still flashes. Is there anyway round this...???
Here are the 2 pictures...


Woka

Using Freeimage To Bring In A Picture But A Reduced Version Into A Picture Box
The code below works in that it lets me bring in a tif image into a picturebox. But since the images I have are
8000*8000. I would like to be able to display it more like a thumbnail. Thought maybe stretchdbits could do it?
Am I on the right track or wasting my time trying it that way?


Option Explicit

Const BI_RGB = 0&
Const DIB_RGB_COLORS = 0&
Const LR_LOADFROMFILE = &H10
Const IMAGE_BITMAP = 0&

Private Declare Function SetDIBitsToDevice Lib "gdi32" (ByVal HDC As Long, ByVal x As Long, ByVal y As Long, ByVal dx As Long, ByVal dy As Long, ByVal SrcX As Long, ByVal SrcY As Long, ByVal Scan As Long, ByVal NumScans As Long, bits As Any, BitsInfo As Any, ByVal wUsage As Long) As Long

Private Sub Form_Load()
'-- open a TIFF file and put it on the form

  Dim dib As Long
  Dim bOK As Long
   
  ' Load TIF
dib = FreeImage_Load(FIF_TIFF, "c: est.tif", 0)

  ' Show TIFF in picture1 requires picture box to have autorefresh
 Call SetDIBitsToDevice(Picture1.hdc, 0, 0, FreeImage_GetWidth(dib), FreeImage_GetHeight(dib), 0, 0, 0, FreeImage_GetHeight(dib), ByVal FreeImage_GetBits(dib), ByVal FreeImage_GetInfo(dib), DIB_RGB_COLORS)
  
'tells me the image is 8000*8000
FreeImage_GetHeight(dib), ByVal FreeImage_GetBits(dib), ByVal FreeImage_GetInfo(dib), DIB_RGB_COLORS) MsgBox "Width: " & FreeImage_GetWidth(dib) & ", Height: " & FreeImage_GetHeight(dib)


The part I tried to do to reduce it: I can't run it yet because I am missing SRCCOPY not sure what it is.

  Dim picturewidth As Integer
  Dim pictureheight As Integer
  Dim tempwidth As Integer
  Dim tempheight As Integer
  picturewidth = 8000
  pictureheight = 8000
  tempwidth = 1000
  tempheight = 1000
 
 Call StretchDIBits(Picture1.hdc, (Picture1.ScaleWidth - picturewidth) / 2, (Picture1.ScaleHeight - pictureheight) / 2, picturewidth, pictureheight, 0, 0, tempwidth, tempheight, _
        ByVal FreeImage_GetBits(Picture2), ByVal FreeImage_GetInfo(Picture2), DIB_RGB_COLORS, SRCCOPY)
End Sub





Edited by - AbbydonKrafts on 5/17/2007 7:02:28 AM

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