Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
ChingYen  
#1 Posted : Saturday, April 5, 2008 1:55:29 PM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 185

Thanks: 8 times
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.

Edited by moderator Sunday, June 10, 2012 9:04:40 PM(UTC)  | Reason: Not specified

Alex Kon  
#2 Posted : Sunday, April 6, 2008 7:12:06 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups:
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
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()
	. . .

ChingYen  
#3 Posted : Sunday, April 6, 2008 10:58:12 PM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 185

Thanks: 8 times
okay. Thanks !!!
Users browsing this topic
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.