Forums

Welcome Guest Search | Active Topics | Members

INFO: ThumbnailListView doesn't display JPEG images modified using LossLessJpegTransform correctly Options
ChingYen
Posted: Saturday, April 05, 2008 9:55:29 PM
Rank: Advanced Member
Groups: Member

Joined: 3/3/2008
Posts: 47
Points: 141
Hi,

Please find attached for the thumbnail sample project. Seems like, there are some photo that will not load in the correct way.

In the project, there is a folder called "photo" in the bin\debug DIR which having 2 photos in it. When your run the project, and try to rotate the photo, 1 photo will work correctly, but the other one seems to have problem.

Please advice.

p/s: The attachments are too big to be uploaded. Please check the support email for the download link. Thanks.
Alex Kon
Posted: Monday, April 07, 2008 3:12:06 AM
Rank: Advanced Member
Groups: Administration , Member

Joined: 1/31/2005
Posts: 386
Points: 403
Hello,

It is not an bug, actually it is strange intersection of features!

Your sample works fine with first image because it has no EXIF information. So there are no strange side-effects. But the second image has EXIF with thumbnail inside. When you use LosslessJpegTransfrom to modify file - it also copies EXIF data from source image to destination.

On the other hand, ThumbnailListView control checks whether the file contains EXIF thumbnail and uses it if possible. But in your case this causes wrong results - your image is already modified, while thumbnail remains the same.

The simples way to avoid such effects is to remove EXIF thumbnail at all and force ThumbnailListView control to load the whole image. I modified your code to do this (you should import Aurigma.GraphicsMill.Codecs namespace to compile this code):

Code:

Case "jpg", "JPG", "Jpg"
      . . .
      Dim jpg As New LosslessJpegTransform(_item.Pidl.Path)
      If Not IsNothing(jpg.Exif) AndAlso _
           jpg.Exif.Contains(ExifDictionary.Thumbnail) Then
            jpg.Exif.Remove(ExifDictionary.Thumbnail)
      End If
      jpg.WriteRotated(tmpFile, RotateFlipType.Rotate270FlipNone)
      jpg.Dispose()
      . . .



Best wishes, Alex.
ChingYen
Posted: Monday, April 07, 2008 6:58:12 AM
Rank: Advanced Member
Groups: Member

Joined: 3/3/2008
Posts: 47
Points: 141
okay. Thanks !!!
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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.