I am trying to write a routine that will read an image, make a thumbnail and write the thumbnail as a new image file.
I am working with ImageMagick MBS . i have the MBS manual but it is really not so straight forward as to how to use the classes, and there are limited examples in the manual, there are no examples of writing images. Does anyone have an example or a link to an example of a simular routine that i could study.
the code that i have worked out is not complete … it stops at the image scaling .
I need to know how I may write the new thumbnail ( to a different file )
Does anyone have an example or a link to an example of a similar routine that i could study.
[code]dim image as IMImageQ16MBS
dim im as ImageMagickQ16MBS
dim imageinfo as IMImageInfoQ16MBS
dim s,blob as string
//dim p as Picture
dim i as Integer
dim newImage As imimageq32mbs
if f = nil then
imageinfo = im.NewImageInfo
If TargetWindows Then
imageinfo.Filename = f.AbsolutePath
imageinfo.FileName = f.ShellPath
image = im.ReadImage(imageinfo)
//check for error
if im.lastexception <> nil and im.LastException.Severity >= 400 then
s = “Error: " + Format(im.LastError,”-0") + " - Severity: " + str(im.LastException.Severity) + EndOfLine + str(im.LastError) // str(Exception.Reason)
elseif image = Nil Then
// make thumb
newImage = image.scale(60, 60)