Rank: Member
Groups: Member
Joined: 12/27/2005(UTC) Posts: 8
|
ThumbNail AutoRotate feature is great, but have logic bug. For example, this picture: http://lee-1.com/temp/s1is-org.jpgThe Jpeg width/height of this image is 2048x1536, and Exif information show the "Orientation" data is 6, so it's a Rotate 90 CW file. ImageUploader 4 can AutoRotate this file's thumbnail very well. But, sometimes , user already rotate the image with some software, (ACDSee or ExifImageViewer.....etc),, then the logic bug come. The sample "pre-rotated image file" can download at here: http://lee-1.com/temp/s1is-rotated.jpgIf user pre-rotate the image file before upload,, this image file data will look like: Jpeg Width/Height: 1536x2048 "Orientation" data still 6 (90 CW), (because most software keep exif data, no change.) And Image Uploader will "Auto" rotate the ThumbNail again! -- but it's wrong. So, The correct logic of AUtoRotate should be: Code:if (ImgFile.ExifData.Orientaion <> 0) { [color=#008000]//don't process any file without orientaion info[/color]
if (ImgFile.JpegWidth > ImgFile.JpegHeight) { [color=#800000]// W<H mean this file already rotated!![/color]
Roate_ThumbNail_Then_Display()
} else {
Display_Origional_ThumbNail()
}
} else {
Display_Origional_ThumbNail()
}
Thanks. (sorry for my broken english) Edited by user Tuesday, February 19, 2008 4:20:31 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 8/3/2003(UTC) Posts: 998
|
Hello,
There is no Image Uploader bug. If any other application does not update the Orientation tag value while changing the image it works wrong. Your piece of code does not work when the original image’s width is higher than its height. So if the image file has wrong Orientation tag value Image Uploader will is unable to recognize it. |
|
|
|
|
Rank: Member
Groups: Member
Joined: 12/27/2005(UTC) Posts: 8
|
I think you mis-unstanded the "EXIF tag" mean.
The "Orientation" information in EXIF header is not talk about "what is this photo's rotate state"
Orientation is mean: "How a photographer/camera take this photo"
So, any software rotate the image without erase the exif orientaion tag is "CORRECT"
,, ok, even let us forget anything about exif., just talk about the "real world" :
The market leader of digital camera is CANON, all canon's camera after 2001 have Orientaion Sensor.
If a Canon DC owner transfer photo from DC to PC with canon's boundle software , the photo will automatic rotate , and the exif "orientaion" tag are keep. , then if the boy upload the photo to my site with ImageUpload4 + Autorotate enabled, all the vertical photo will take mistake.
is it not a problem? and it's very easy to fix.
or, add a param for us?
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 8/3/2003(UTC) Posts: 998
|
So you could set the AllowAutoRotate property value to false for such users. Edited by user Monday, February 25, 2008 5:24:50 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Member
Joined: 12/27/2005(UTC) Posts: 8
|
I have no way to detect user's camera maker befor they upload compelte. So, If I don't want canon's user take the mistake, my only way is disable this feature for everybody.
And, even I can detect user's camera maker at client side, how can I do?? If the maker is Fujifilm, enable or disable? that's same, because fujifilm don't have a Orientation sensor.
If I detect the user is use Canon camera (or any other maker have orientaion sensor), then?
Enable this feature? somebody will take error. Disable this feature? it's mean "ALL" user can't use autorotate.
- - -
If AutoRotate is not smart, it's a fair feature.
I hope you "THINK like a webmaster", not a programmer.
AutoRoatate is a great idel. but if you don't have a good logic, the user (website's user) will confuse why their photo "sometimes looks ok sometimes worng"
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 8/3/2003(UTC) Posts: 998
|
Hello, You can recognize the type of the user’s camera by using the ExtractExif property, which allows to specify the EXIF fields to be extracted and uploaded along with other data. Edited by user Tuesday, February 19, 2008 4:23:16 PM(UTC)
| Reason: Not specified |
|
|
|
|
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.