Search the web
Sign In
New User? Sign Up
AIL_Development · AIL Developer's Forum
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
HDR - more info   Message List  
Reply | Forward Message #96 of 125 |
Re: HDR - more info

<peteraddington@...> wrote:
>
> Has anyone managed to open a HDR with freeimage yet?
>
> Also, has anyone got any tips on the fastest methods of returning
> thumbnails using AIL?



This is the code you'd use to load an HDR image and resize it to 200
x 200 pixels (thumbnail size)... then convert it to an StdPicture
object to display on a form or PictureBox control in VB6:

------------------------

Dim objAIL As New cAdvancedImagery
Dim hIMG As Long
Dim objPic As StdPicture

Me.AutoRedraw = True

If objAIL.IO_LoadImage("C:\TEST.HDR", hIMG) = True Then
If objAIL.Effect_Resize(hIMG, 200, 200, rc_Clean) = True Then
If objAIL.Convert_ImageToPicture(hIMG, objPic) = True Then
Set Me.Picture = objPic
Me.Refresh
MsgBox "Success!"
Else
MsgBox "Error converting: " & objAIL.Error_GetLast
End If
Else
MsgBox "Error resizing: " & objAIL.Error_GetLast
End If
objAIL.IO_DestroyImage hIMG
Else
MsgBox "Error loading: " & objAIL.Error_GetLast
End If
Set objAIL = Nothing

------------------------

Problem is that the convert function throws an error. In fact, when
the resize function tries to convert the image to 32-bit to
manipulate, the image does not get converted to 32-bit. It starts
out at 96-bits (according to FreeImage_GetBPP function) and stays
that way even after calling FreeImage_ConvertTo32Bits function.

There's obviously something fishy going on with loading / manipulating HDR
images. I've posted about it on the official FreeImage forums and will let you
know what the result is:

https://sourceforge.net/forum/forum.php?thread_id=2335019&forum_id=36111

- Kevin




Tue Oct 7, 2008 4:28 pm

kwilson1997
Offline Offline
Send Email Send Email

Forward
Message #96 of 125 |
Expand Messages Author Sort by Date

the images i downloaded were from http://www.debevec.org/probes/ and they don't open in the pictureit utility either. i have tried a hdr from another source...
bluescreenweasel
bluescreenwe...
Offline Send Email
Sep 17, 2008
11:27 pm

Has anyone managed to open a HDR with freeimage yet? Also, has anyone got any tips on the fastest methods of returning thumbnails using AIL?...
bluescreenweasel
bluescreenwe...
Offline Send Email
Oct 7, 2008
3:56 pm

... This is the code you'd use to load an HDR image and resize it to 200 x 200 pixels (thumbnail size)... then convert it to an StdPicture ... Dim objAIL As...
Kevin Wilson
kwilson1997
Offline Send Email
Oct 7, 2008
5:18 pm

cheers Kevin, that's the same code i was using, with the same results. It just retuned a messagebox with "error -" so something odd was going wrong. And thanks...
bluescreenweasel
bluescreenwe...
Offline Send Email
Oct 8, 2008
10:31 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help