Get your own customer support community
 

deepzoomtools.dll throwing error with some images on website, but not all

I'm using deepzoomtools.dll on my website to dynamically create deepzoom images when a user uploads an image. It seemed like it was working fine, but I've noticed recently that some images are throwing an error and not creating the image and I'm not sure why. The images I'm using are the jpgs in the sample pictures folder found in the my documents folder in Windows 7 (the default images). I haven't done anything to the images themselves and they display fine. Before I upload the photo to my site, I resize the picture. Then I use deepzoomtools.dll to dynamically create a deepzoom image from the resized image. It has worked fine with most of the images I've tried, but these sample pictures fail every time with the above errors on my site. When I try the same images on my local dev machine using visual studio 2008 and the builtin web server (not IIS), the deepzoom images are created correctly. Any idea what is going on or how I can resolve it? The only difference I can see is that I'm using a shared hosting environment that uses IIS 6. The resized uploaded images show up fine if I view them in the browser, so I don't think it is corrupted... I've seen two different errors with the same set of jpg files.

Here is my code:
Dim imagepath As String = thePath
Dim ic As New ImageCreator()
ic.TileSize = 254
ic.TileFormat = ImageFormat.Jpg
ic.ImageQuality = 1
ic.TileOverlap = 1

Dim target As String = System.IO.Path.ChangeExtension(imagepath, "dzi").Replace("UploadedImages\", "zoom\")
If System.IO.File.Exists(target) = False Then
ic.Create(imagepath, target)
End If

Here's the errors:
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
at MS.Win32.UnsafeNativeMethods.IInternetSecurityManager.MapUrlToZone(String pwszUrl, Int32& pdwZone, Int32 dwFlags)
at MS.Internal.PresentationCore.SecurityHelper.MapUrlToZoneWrapper(Uri uri)
at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
at System.Windows.Media.Imaging.BitmapDecoder.Create(Uri bitmapUri, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy)
at System.Windows.Media.Imaging.BitmapDecoder.Create(Uri bitmapUri, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption)
at Microsoft.DeepZoomTools.BitmapTransformer.CreateBitmapDecoder(StreamEventArgs streamEventArgs, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption)
at Microsoft.DeepZoomTools.BitmapTransformer.CreateInputFrame(InputNode inputNode, Int32Rect rectNeeded)
at Microsoft.DeepZoomTools.BitmapTransformer.GetPixelSize(String fileName)
at Microsoft.DeepZoomTools.SparseImageCreator.Create(ICollection`1 images, String destination)
at Microsoft.DeepZoomTools.ImageCreator.Create(String source, String destination)

and the other one is:
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IO.FileFormatException: The image decoder cannot decode the image. The image might be corrupted. ---> System.Runtime.InteropServices.COMException (0x88982F60): Exception from HRESULT: 0x88982F60
--- End of inner exception stack trace ---
at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
at System.Windows.Media.Imaging.BitmapDecoder.Create(Uri bitmapUri, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy)
at System.Windows.Media.Imaging.BitmapDecoder.Create(Uri bitmapUri, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption)
at Microsoft.DeepZoomTools.BitmapTransformer.CreateBitmapDecoder(StreamEventArgs streamEventArgs, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption)
at Microsoft.DeepZoomTools.BitmapTransformer.CreateInputFrame(InputNode inputNode, Int32Rect rectNeeded)
at Microsoft.DeepZoomTools.BitmapTransformer.GetPixelSize(String fileName)
at Microsoft.DeepZoomTools.SparseImageCreator.Create(ICollection`1 images, String destination)
at Microsoft.DeepZoomTools.ImageCreator.Create(String source, String destination)
 
sad I’m confused
Inappropriate?
1 person has this question

User_default_medium