Rank: Newbie
Groups: Guest
Joined: 12/30/2008(UTC) Posts: 4
|
Hi
At the moment I am doing this:
Dim bmp As New Aurigma.GraphicsMill.Bitmap bmp.Load(sPath & sFileName) 'Save image thumbnail bmp.Transforms.Resize(75,75, Aurigma.GraphicsMill.Transforms.ResizeMode.Fit) Dim sOutputFilename = sPath & "\thumbs\" & sFileName & ".jpg" bmp.Save(sOutputFilename, New Aurigma.GraphicsMill.Codecs.JpegEncoderOptions(75, False)) bmp.Dispose() Response.End()
This works for all common graphics formats but not all psd files. For some PSD files it seems to generate an empty image.
Is there a different technique that always gets the flattened image from a PSD file?
Thanks
JG
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hello, For PSD files I recommend you to use the following code: Code:Dim bitmap As New Aurigma.GraphicsMill.Bitmap
'Save image thumbnail
Dim sOutputFilename = "c:/testpsd1.jpg"
Dim reader As New Aurigma.GraphicsMill.Codecs.PsdReader("c:\Postcard01.psd")
Dim frame As Aurigma.GraphicsMill.Codecs.Frame = reader.LoadFrame(0)
frame.GetBitmap(bitmap)
bitmap.Transforms.Resize(75, 75, Aurigma.GraphicsMill.Transforms.ResizeMode.Fit)
bitmap.Save(sOutputFilename, New Aurigma.GraphicsMill.Codecs.JpegEncoderOptions(75, False))
bitmap.Dispose()
|
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 12/30/2008(UTC) Posts: 4
|
Thanks for the reply.
I was wrong in fact the original code does produce a graphic. I was also trying to push the output to an outputstream and display on a page. It was this that did not produce an image.
Thanks again.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.