This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
JulianGrahame  
#1 Posted : Monday, January 19, 2009 6:26:15 AM(UTC)
JulianGrahame

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
Tamila  
#2 Posted : Monday, January 19, 2009 4:50:04 PM(UTC)
Tamila

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()
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
JulianGrahame  
#3 Posted : Tuesday, January 20, 2009 5:10:14 PM(UTC)
JulianGrahame

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.
Users browsing this topic
Guest
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.