|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
rotating pictures on the flyIs there a way in vb.net to, 1) detect if an image has been taken with a
Show quote > camera on a vertical axis, and 2) rotate the picture for display - across > an > intranet (asp.net), with huge files sizes (2 - 3 MB), that doesn't take > too long? > (LOL) > > Thanks, > Jim On Sat, 12 May 2007 17:03:50 -0700, JimO <joneill517***@XXXearthlink.net>
wrote: > Is there a way in vb.net to, 1) detect if an image has been taken with a Unless you are dealing with a camera that has a built-in sensor that > camera on a vertical axis, and 2) rotate the picture for display - > across an intranet (asp.net), with huge files sizes (2 - 3 MB), that > doesn't take too long? detects orientation *and* the camera stores that information in a custom EXIF field *and* that data is preserved in the copy of the image you're looking at, you cannot do #1 without human assistance. I'm not aware of any available general-purpose algorithm to detect picture orientation based on the contents alone. As far as #2 goes, that's pretty simple once you've read the image in. You can use the Image.RotateFlip() method on a Bitmap that you've loaded from a file. I hate to break it to you, but even for compressed JPEGs, 2-3 MB isn't that big anymore. :) Pete I hate to break it to you, but even for compressed JPEGs, 2-3 MB isn't
that big anymore. :) LOL well... yeah... but I have to display it on a web page. Although, given the fact it would be accross a a gigabit wire within a small network (like 2 or 3 machines), it may not take that long. One the other hand, I would want to resize the display to a thumbnail image (like maybe 200x300) onto kind of a contact sheet. When paging through them, that might take a while if there are more than a few per page. The camera would be either a Nikon D50 or a D200. Other software I use will rotate the image, when needed, so, I know the info is in there somewhere. Show quote "Peter Duniho" <NpOeStPe***@nnowslpianmk.com> wrote in message news:op.tr8rs7bw8jd0ej@petes-computer.local... > On Sat, 12 May 2007 17:03:50 -0700, JimO <joneill517***@XXXearthlink.net> > wrote: > >> Is there a way in vb.net to, 1) detect if an image has been taken with a >> camera on a vertical axis, and 2) rotate the picture for display - >> across an intranet (asp.net), with huge files sizes (2 - 3 MB), that >> doesn't take too long? > > Unless you are dealing with a camera that has a built-in sensor that > detects orientation *and* the camera stores that information in a custom > EXIF field *and* that data is preserved in the copy of the image you're > looking at, you cannot do #1 without human assistance. I'm not aware of > any available general-purpose algorithm to detect picture orientation > based on the contents alone. > > As far as #2 goes, that's pretty simple once you've read the image in. > You can use the Image.RotateFlip() method on a Bitmap that you've loaded > from a file. > > I hate to break it to you, but even for compressed JPEGs, 2-3 MB isn't > that big anymore. :) > > Pete |
|||||||||||||||||||||||