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...
Show off your group to the world. Share a photo of your group with us.

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
Problem with TIFF to PNG Conversion in ASP   Message List  
Reply | Forward Message #38 of 125 |


Hi,

I have had success with converting thousands of fax pages from tif to
png with this code, but I have a client with computer generated faxes
that are now causing issues with this conversion and I cannot figure
out why or how they are different. When I look at the property of
the TIF files, they have the same compression as others, and the main
diff is the size, they are 2292L X 1728 pixels wide, with Resolution
X of 204dpi and Resolution Y of 196dpi.

The TIF files open fine in windows, and all incoming tif files are
generated by our fax2email company.

The fax fails at this line (code section follows
below):
If objAIL.Convert_ImageToBitmap(hIMG(lngCounter),
hBITMAP) = True Then...

"objAIL.Error_GetLast" does not return any information.

I cannot freely distribute the fax tif file because of patient
confidentiality, so please give me an email to send directly to, or
let me know if there is more debugging I can do.

Thanks,
Chay

Section Code:
'0 error

If objAIL.MultiPage_Load(file, hIMG, lngTotal) = True Then

Response.Write "Loaded " & CStr(lngTotal) & " images from the multi-
page TIFF<BR>"

For lngCounter = 0 To lngTotal - 1

response.write fax_pending_folder & "\" &
replace(mainfile.name,".tif","") & "_" & lngCounter & ".png" & "<BR>"

'1 error

If objAIL.Convert_ImageToBitmap(hIMG(lngCounter),
hBITMAP) = True Then

'2 error

If objAIL.IO_SaveImage(hIMG(lngCounter),
fax_pending_folder & "\" &
replace(mainfile.name,".tif","") & "_" & lngCounter & ".png", IF_png,
png_default, True) = True Then

'3 error

If objAIL.IO_SaveImage(hIMG(lngCounter),
fax_pending_copy_folder & "\" &
replace(mainfile.name,".tif","") & "_" & lngCounter & ".png", IF_png,
png_default, True) = True Then

else

Response.Write "Error - " & objAIL.Error_GetLast & "3<BR>"

end if

Else

Response.Write "Error - " & objAIL.Error_GetLast & "2<BR>"

End If

Call objAIL.IO_DestroyBitmap(hBITMAP)

Else

Response.Write "Error - " & objAIL.Error_GetLast & "1<BR>"

End If

Call objAIL.IO_DestroyImage(hIMG(lngCounter))

Next

Else

Response.Write "Error - " & objAIL.Error_GetLast & "0<BR>"

End If






Sun May 20, 2007 5:08 pm

marlin02910
Offline Offline
Send Email Send Email

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

Hi, I have had success with converting thousands of fax pages from tif to png with this code, but I have a client with computer generated faxes that are now...
marlin02910
Offline Send Email
May 22, 2007
4:56 am

Hi, I have had success with converting thousands of fax pages from tif to png with this code, but I have a client with computer generated faxes that are now ...
Fisher Man
marlin02910
Offline Send Email
May 22, 2007
5:01 am
Advanced

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