what I am doing ? I am reading an image, making a copy and shrinking the copy to a thumbnail
on my Mac 10.11 this this works
on my other Mac 10.15 it gets an exception
exception line is : b.Write blob.CopyString.
The exception I get is here
here is the code.
Please advise …
const UndefinedFilter=0
const PointFilter=1
const BoxFilter=2
const TriangleFilter=3
const HermiteFilter=4
const HanningFilter=5
const HammingFilter=6
const BlackmanFilter=7
const GaussianFilter=8
const QuadraticFilter=9
const CubicFilter=10
const CatromFilter=11
const MitchellFilter=12
const LanczosFilter=13
const BesselFilter=14
const SincFilter=15
Dim t As FolderItem
// original image
if not SourceFolder.Child(oldName).Exists or SourceFolder = Nil then
MsgBox "Source Does Not Exist " + SourceFolder.Child(oldName).NativePath
Return False
end if
// Destination Folder
if not DestinationFolder.Exists or DestinationFolder = Nil then
MsgBox "Thumbnail or Destination folder does not exisit " + DestinationFolder.NativePath
Return False
end if
dim image as new GM16ImageMBS
image.read(SourceFolder.Child(oldName))
image.filterType = image.LanczosFilter
image.scale(new GM16GeometryMBS(size, size))
// save 16 bit
dim blob as new GM16BlobMBS
image.depth = 16
image.write blob
t = DestinationFolder.Child(newName)
dim b as BinaryStream
b = t.CreateBinaryFile("application/binary")
b.Write blob.CopyString
b.Close
Return True