T O P I C R E V I E W |
dracola |
Posted - Jul 19 2012 : 04:02:51 how to know that image taken from digital camera in position horizontal or vertical? i tried from imageenview.bitmap.height or width, but it seem all image assum to be horizontal position. any one can help pliss... thank's |
8 L A T E S T R E P L I E S (Newest First) |
w2m |
Posted - Sep 12 2013 : 08:44:31 I's been a few years since I had working camera, so I had to do some testing with my new Nikon P520.
When I first tried autorotation with imageen, the image did not rotate. By looking at the EXIF parameters I found auto rotate was not enabled by the camera so the EXIF_Orientation parameters were not being saved. After I enabled auto rotate in the camera, the images displayed correctly just by calling: mageTmp->Params->EnableAdjustOrientation = true; imageTmp->LoadFromFile(path);
William Miller Adirondack Software & Graphics Email: w2m@frontiernet.net EBook: http://www.imageen.com/ebook/ Apprehend: http://www.frontiernet.net/~w2m/index.html |
clementcdip |
Posted - Sep 12 2013 : 07:37:51 Thanks you very much |
w2m |
Posted - Sep 12 2013 : 07:29:15 Perhaps you are using the wrong value for EXIF_Orientation? I do not really understand what these values mean so I can not help more.
property EXIF_Orientation: integer;
Description The orientation of the camera relative to the scene, when the image was captured
Value Description 1 top left side 2 top right side 3 bottom right side 4 bottom left side 5 left side top 6 right side top 7 right side bottom 8 left side bottom
A website described it as follows: http://sylvana.net/jpegcrop/exif_orientation.html
and here: http://beradrian.wordpress.com/2008/11/14/rotate-exif-images/
You might just try: mageTmp->Params->EnableAdjustOrientation = true; imageTmp->LoadFromFile(path);
William Miller |
clementcdip |
Posted - Sep 12 2013 : 07:04:49 Because i don't understand something. In Window i got one picture sized (100 x 300px) with exif orientation. Extension of the picture is .jpeg And when i'm executing this part of code: imageTmp->ParamsFromFile(path); if(imageTmp->Params->EXIF_Orientation>1) { imageTmp->Params->EnableAdjustOrientation = true; imageTmp->LoadFromFile(path); } Image is in 300 x 100px mode. |
w2m |
Posted - Sep 12 2013 : 06:17:58 If your image contains orientation information in the EXIF, the image will be automatically shown in the orientation stored in the EXIF when it is loaded.
William Miller |
clementcdip |
Posted - Sep 12 2013 : 05:46:03 What did you mean by correct position ? You will put the picture at is original orientation ? |
dracola |
Posted - Jul 19 2012 : 05:11:53 Thanks a lot, I will try it |
w2m |
Posted - Jul 19 2012 : 04:55:05 Try using EnableAdjustOrientation or TIETWainParams.AutoRotate
TIOParams.EnableAdjustOrientation
Declaration
property EnableAdjustOrientation:boolean;
Description
If you set this property to True before load a file which contains EXIF information, the image will be automatically orientated. This property also sets JPEG_EnableAdjustOrientation and TIFF_EnableAdjustOrientation.
Example ImageEnView1.IO.Params.EnableAdjustOrientation:=true; ImageEnView1.IO.LoadFromFile('input.jpg');
or try setting TIETWainParams.AutoRotate := True.
Declaration
property AutoRotate: boolean;
Description
When true this capability depends on intelligent features within the Source to automatically rotate the image to the correct position.
William Miller |