I was able to compile and run my app in 2006 version,
but when I run 2007 (R1) version, I have an error:
Code, WinMain.Action, line 21,
Type mismatch error. Expected Int32, but got Unknown
Type.
IWImage.Image = App.MakeThumbnail(p)
line 21 is in this Action:
Dim f As Folderitem
Dim dlg As OpenDialog
Dim p As Picture
dlg = New OpenDialog
dlg.Filter ="Image Files (*jpg;*.jnp;*.gif;*.jpeg;)"
//run the openDialog
f = dlg.ShowModal
//check for user cancelling
If f <> Nil Then
folderImage = f
// display in the ImageWell Object
p = f.OpenAsPicture
IWImage.Image = App.MakeThumbnail(p)
newPicture = True
end if
Function MakeThumnail( Image As Picture, iWid As
Integer, iHi As Integer - HEIGHT) As Picture
Dim thumb As Picture
Dim ratio As Double
// Return nil if image is Nil
If image = Nil Then
Return Nil
End If
If iWid = 0 Or Not isNumeric( iWid ) Then
iWid = WIDTH
End If
If iHi = 0 Or Not isNumeric( iHi ) Then
iHi = HEIGHT
End If
// Create Image Thumbnail
If image.Width > image.Height Then
ratio = image.Height / image.Width
thumb = New Picture( iWid, iHi * ratio, 32)
Else
ratio = image.Width / image.Height
thumb = New Picture(iWid * ratio, iHi, 32)
End If
// Draw Thumbnail
thumb.Graphics.DrawPicture image, 0, 0, thumb.Width,
thumb.Height, 0, 0, image.Width, image.Height
// Return Thumbnail
Return thumb
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>