[Q] How to get orientation of photo taken from camera - General Questions and Answers

Hi All,
I am trying to get the photo orientation, which is captured from camera, using
ExifInterface exifReader = new ExifInterface(imagePath);
int orientation =exifReader.getAttributeInt(ExifInterface.TAG_ORIENTATION,-1);
I have tested the same code on three different android devices.
1) On Micromax A60 android ver 2.1
orientation value is always 0 which is ok because it saves the image in the same orientation as it is being captured.
2) on Samsung Galaxy pop Gts5570 android ver 2.2
orientation value is 1 if image is landscape
orientation value is 6 if image is portrait
3) on Samsung Galaxy GtI9003 android ver 2.2
orientation value is always 1
so in the last case How to find the orientation information of image ???
What does it mean in third case why it always gives the 1??
any one having Idea on this then please help me on this..
Thanks in Advance

Related

iPhone Camera Software! What is it?

I have WM6 now. it's great but I'm missing old iPhone ROM camera software. Where can I get it? (or at least ateksoft but it doesn't work too good)
hi
download:
http://www.zippyshare.com/v/26451362/Camera4_1_1_.00_Build23355_.rar.html
Thank you very much for your effort
But I cannot run it here. It states it doesn't have some components. I'll check it out.
i found out that GsmAMREnc.dll is missing. Could you somehow extract it from the ROM?
Why not to use a CoolCamera?
1
2
3
let's go
Because it S.U.C.K.S it is the worst camera program ever.
1. It has reversed colours (which is fixable anyway)
2. Invalid orientation (which is also fixable but view goes smaller)
3. 352x288 - max resolution available -.-
kartam said:
1
3. 352x288 - max resolution available -.-
Click to expand...
Click to collapse
on first WM 6 relase for Tornado i got 1280x1024, after update i didnn't install it
kartam said:
1
2
3
let's go
Because it S.U.C.K.S it is the worst camera program ever.
1. It has reversed colours (which is fixable anyway)
2. Invalid orientation (which is also fixable but view goes smaller)
3. 352x288 - max resolution available -.-
Click to expand...
Click to collapse
not true. its the best camera program ever. i have it and its great. max resolution avaible is not 352x288, its as high has ur camera goes. it wil say the max resolution is 352x288 if you accidently set the camera source to the "front" camera, rather than the "main" camera.
and the screen goes smaller so u can fit it all on the screen. the htc camera software does this too. its the aspect ratio your taking the picture at that effects how you see it on the screen. if you take a 4:3 picture it will fill the whole screen.
the reason it has the revered colors is the way how some camera lens's are made. if it only had 1 option then you might find that some phones it appears right and some it appears wrong. so they add both options.
on my t-mobile sda i take 320x240 12-15fps videos. or if i wanted i could take some 1280x1024 video 1fps lol.
I always get wrong camera orientation
I tried to extract iphone rom by myself. but I get only the most important files like device.exe. All extracted files were 1,75 mb while OS.nb was > 30 mb! what could I do wrong?
OK... coolcamera works somehow for me,.. but i don't like it anyway. Can any1 give me file: gsmamrenc.dll?

[Q] Gallery3D Only support Portrait Mode phone?

Hi All,
we are now developing Android phone on mmp2 board which is of landscape mode. We found Galley3D works perfectly on portrait mode phone while has a problem on landscape one. As you know Gallery3D can tilt pictures/videos according to values of Gsensor. But the Gsensor’s coordinator on landscape mode phone is different from that of portrait. This difference make Galley3D’s not working well on our mmp2 board, i.e., Gallery3D only supports portrait mode phone. Below is for the details:
Let’s take a look at onSensoChanged function in file GridInputProcessor.java, Gallery3D calculates the tilt value from X-axis value (values [0]) / Y-axis value (values [1]) depends on the compare of current display’s width and height.
public void onSensorChanged(RenderView view, SensorEvent event, int state) {
…..
switch (event.sensor.getType()) {
case Sensor.TYPE_ACCELEROMETER:
float[] values = event.values;
/*tilt value is calculated from X-axis value (values [0]) / Y-axis value (values [1]) */
float valueToUse = (mCamera.mWidth < mCamera.mHeight) ? values[0] : -values[1];
float tiltValue = 0.8f * mPrevTiltValueLowPass + 0.2f * valueToUse;
…… }
break;
}
}
For Portrait mode phone:
(1) When Gallery3D is in Portrait mode, tiltValue uses value of X axis since mWidth < mHeight, Galley3D would tilt the pictures when X value of Gsensor changes, this behavior is expected.
(2) When Gallery3D is in Landscape mode, tiltValue uses value of Y axis since mWidth > mHeight, Galley3D would tilt the pictures when Y value of Gsenso changes, this behavior is expected.
/samba/PortraitMode.bmp
For Landscape mode phone:
(3) When Gallery3D is in Portrait mode, tiltValue uses value of Y axis since mWidth < mHeight, Galley3D would tilt the pictures when Y value of Gsensor changes changes, this behavior is unexpected.
(4) When Gallery3D is in Landscape mode, tiltValue uses value of X axis since mWidth > mHeight, Galley3D would tilt the pictures when value of X value of Gsensor changes, this behavior is unexpected.
/samba/LandscapeMode.bmp
Questions:
(1) Do we have solution to fix this issue? Is that in APP?
(2) There are some other Gsensor games in the market has the same issue, i.e., only support Portrait mode phone, e.g., the Teeter Game, is there any idea for the workaround in framework/SensorHAL so that those games can still be used in Landscape mode phone?
Hope above is clear; we are looking forward to your kindly reply and many thanks in advance.
it definitely supports landscape, I'm using it on my Dell streak using leaked eclair firm ware, quick is forced/ locked landscape.
unless Dell have altered the code, which can't tell because they won't release the source, can't really help much more than that. just to let you know that it works
Landscape works perfect on 3D gallery for my Evo with Froyo.
Can someone post an appbrain/androlib link or a QR code? I cannot find this app
It's a stock application...
Oh, mine is not called that. It's just "Gallery"

[Mod]Camera[4.0][4.1][4.2] [Discontinued]

Code:
[CENTER]---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[COLOR="Red"]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/COLOR]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ICS 4.0.4 Camera[/CENTER]
When in 3D mode the preview will be upside down
Workaround: select last taken pic let it open go back to camera preview is right side up or Start 3D Camera instead of Normal Camera from launcher
ISO Menu is not needed the Auto Option works quite well IMO ICS camera Quality is good enough
Todo -
Rotate Video Output Preview Fixed Rotate
Rotate 3D Video Preview + Output
update NOV 5 5.42am
Voice Shutter Now activated by the word "cheese"
Removed Shutter tone 1 Replaced it with OFF option
IPP was set to off by deault enabled it Lense Correction + Noise Filter
YUV422i Preview
JPEG 100% Quality Clear Arccamera Data
update NOV6
Burst Shot @ Full Res
Burst Shots Now = 20 Shots:D
Enabled Macro CAF in menu
NOV10
Dithered Bitmap
InpreferQualityOverSpeed
Disabled sounds
removed Manual Focus
Quality is now Really @100%
NOV12
Beta Added Followin scene modes
Action
Beach
Barcode
Candlelight
Closeup
Cine - Later Add to Video
Fireworks
Mood
Night indoor
Old-film - Later Add To Video
Party
Snow
Steadyphoto
Super night
Theatre
Nov 13 Scene Modes All Working :D These Were not Activated but Actually Coded into ArcCamera Enjoy Next stop Video Scene Modes and Higher bitrates If you notice the icons for the scenes dont match the scene thats because there generic icons Visuals l8R.
RC2 - Video Scene Modes
Video Focus Modes
Higher Bitrate Set IT to 36mbps
Let me know if camera works with low battery
Nothing Major
[CENTER]---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[COLOR="Red"]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/COLOR]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
JB 4.2 Camera[/CENTER]
Note Front Cam In Now upside down lol use any other camera app if you really need it
Android 4.2 Cam MD1 inc photosphere
Just tried it seem buggy on o3d anyway here is samples
Photosphere
[url=http://iceimg.com/a720c7a801344d.jpg.htm][img]http://iceimg.com/t/a7/20/c7a801344d.jpg[/img][/url]
Normal
[url=http://iceimg.com/bdeaca643ff9f8.jpg.htm][img]http://iceimg.com/t/bd/ea/ca643ff9f8.jpg[/img][/url]
Even though Photosphere preview is upside down the Final Image rotation is corrected
[B][U][URL=http://d-h.st/aVq]JB 4.2 CAM + Gallery O3D_ICS.rar - 8.50 MB[/URL][/U][/B]
Click to expand...
Click to collapse
P1 Camera.zip - 4.28 MB
http://d-h.st/dEs <<<<<<<<<<<<<<<<<<<<<<< Media Profile 40mbps Vid+ 320kbps 2ch Audio
12th April Added Last Version for V28 V30a V30b
delete ArCamera from system/app
install v28-V30a-V30b-ArcCamera.apk like normal apk's no need to copy to system dir
I can give you temporary CWM access in order to do the tests.
Sent from my LG-P920 4.0.4 ICS using xda app-developers app
xbsall said:
I can give you temporary CWM access in order to do the tests.
Sent from my LG-P920 4.0.4 ICS using xda app-developers app
Click to expand...
Click to collapse
I Changed the rotation to 0 90 180 270 seems to havwe no effect we going to have to find a way to fool the MPL sensor and use the phone upside down to take pictures however i got it todo a raw image dump in .yuv formart. you can play with the settings open terminal type su then camera_test f there you can override default settings in ArcCamera.apk i saw something about Forced Landscape orientation if that
Progress?
ICS's arccamera hasn't continuous focus for video recordings
bether said:
ICS's arccamera hasn't continuous focus for video recordings
Click to expand...
Click to collapse
its there just disabled maybe its because v30b
Code:
case 268435477:
switch (j)
{
case 536871008:
s = "auto";
break;
case 536871009:
s = "macro";
break;
case 536871010:
s = "auto";
break;
case 536871011:
s = "infinity";
break;
case 536871013:
s = "fixed";
break;
case 536871017:
s = "continuous-picture";
break;
case 536871024:
s = "auto";
break;
case 536871025:
s = "continuous-video";
break;
}
break;
And if there is no ticam.xml/media profile where can we see the jpg compression and other data?I think you say it is in omap.so files...maybe?So, can you tweak any feature?camera's tweaks in builp.prop will work?
Thanks defcomg!
lemach said:
And if there is no ticam.xml/media profile where can we see the jpg compression and other data?I think you say it is in omap.so files...maybe?So, can you tweak any feature?camera's tweaks in builp.prop will work?
Thanks defcomg!
Click to expand...
Click to collapse
The Jpeg Compression Can be manually set in the APK i managed to get the UI From Rotating but preview still rotates if the orientaion Sensor can be disabled the camera might be usable till then CameraPro Works fine if not better Minus the 3D part Plus you can Set Bitrate Frame Rate audio channels etc tried 60fps and 40k bitrate but it was in low light will try again see if it works im sure camera.omap4.so can be compiled from source
Can the setting of the other camera program be ported to the ArcCamera?
Pesach85 said:
Can the setting of the other camera program be ported to the ArcCamera?
Click to expand...
Click to collapse
Yes but the thing is it's upside i don't see the point of modding he app if i can't get the preview working right side up
Can you upload camera.omap4.so from SU870/P940?
I tried add these lines to build.prop.
accelerometer.hwrotation=270
input.hwrotation=270
ro.sf.hwrotation=270
but it effects only for whole screen.
bether said:
Can you upload camera.omap4.so from SU870/P940?
I tried add these lines to build.prop.
accelerometer.hwrotation=270
input.hwrotation=270
ro.sf.hwrotation=270
but it effects only for whole screen.
Click to expand...
Click to collapse
Is the preview still messed up
https://github.com/milaq/android_vendor_lge_p940/blob/ics/proprietary/camera.omap4.so
Ask that use called 2old4toys for camera.omap4.so i don't have su870 and also for ducati-m3.bin
In GB i swapped base_image_app_m3.xem3 with the one from SU760 it also gave me upside down view so the prob is there if we could find a beta for p920 and get that file we would be sorted
Thanks.
Unfortunately 2old4toys hasn't rooted his Cube 3D
I found another topic about upside/down camera:
http://forum.xda-developers.com/showthread.php?t=1848595
Maybe could help for find solution.
bether said:
Thanks.
Unfortunately 2old4toys hasn't rooted his Cube 3D
I found another topic about upside/down camera:
http://forum.xda-developers.com/showthread.php?t=1848595
Maybe could help for find solution.
Click to expand...
Click to collapse
I asked for help in there T.I Forum will see if they reply its possible to edit the ducati-m3.bin but there is a file thats required for that but its not included in there firmware folder using this app http://processors.wiki.ti.com/index.php/Category:Code_Composer_Studio_v5
/system/lib/libcameraservice.so ??
---------- Post added at 10:21 PM ---------- Previous post was at 09:55 PM ----------
bether said:
Thanks.
Unfortunately 2old4toys hasn't rooted his Cube 3D
I found another topic about upside/down camera:
http://forum.xda-developers.com/showthread.php?t=1848595
Maybe could help for find solution.
Click to expand...
Click to collapse
To copy file from system folder is not required root, he can do it
He can use Android Commander to copy it directly into pc.
I 'd ask to him:
- /system/lib/hw/camera.omap4.so
- /system/lib/libcameraservice.so
- /system/vendor/firmware/ducati-m3.bin
Defcom not a clue but if the application Word Lens has an option to rotate the camera and with this if it looks good, do not know if you will help.
Look:
https://play.google.com/store/apps/details?id=com.bb.upsidedowncamera&feature=search_result
https://play.google.com/store/apps/details?id=rubberbigpepper.Orientator&feature=also_installed
Maybe this will help.
Anyway I can't calibrate "motion sensor" can be bug?
viper531986 said:
Defcom not a clue but if the application Word Lens has an option to rotate the camera and with this if it looks good, do not know if you will help.
Click to expand...
Click to collapse
Yes this app can rotate the camera preview without rotate the app commands!!
Defcomg in this must be the solution!
I think problem is at the communication camera apps with sensor.
Because the "Set Orientation" partially repair that problem.
Solution:
1. Download "Set Orientation" https://play.google.com/store/apps/...eyesfree.setorientation&feature=search_result
2. Run it and set to "Automatic"
3. Run any camera app and turn smartfone upside/down (vol+- on the bottom)
It's ALL!!
Can you do motion sensor calibration?
I don't Is notification "Cannot calibrate. Try again"
bether said:
I think problem is at the communication camera apps with sensor.
Because the "Set Orientation" partially repair that problem.
Solution:
1. Download "Set Orientation" https://play.google.com/store/apps/...eyesfree.setorientation&feature=search_result
2. Run it and set to "Automatic"
3. Run any camera app and turn smartfone upside/down (vol+- on the bottom)
It's ALL!!
Can you do motion sensor calibration?
I don't Is notification "Cannot calibrate. Try again"
Click to expand...
Click to collapse
work for me

[Q] How to change orientation of another application from inside my application ?

Hi ,
I am creating an application which will change orientation of some other already installed application , Reading the orientation of other application installed was simple through ApplicationInfo object but noway to change it.
After some R&D I have come to notice similar types of app's (which change orientation) also run Service , that means' they make orientation change on fly but I don't know how exactly they do it ?
Regards
New Android Developer

[Q] Tilt sensor is off for some apps, possible fix?

Before my Asus tf700 Infinity, I owned a Samsung Galaxy Tab. I purchased some programs and games for it, and all was well until it was stolen. The problem? Now I've downloaded and used those same apps on my tf700 Infinity, and the orientation is off by ninety degrees on quite a few. It has to do with Android's API and Honeycomb, and how the default base orientation is set in the framework policy. Before tablets, the default orientation for the Android API was portrait, but tablets made landscape defaults a possible better default. Apps not written to accommodate this would have the sensors read 90 degrees skewed for landscape default devices (like my tf700), because the sensor data is being read from landscape (regardless of orientation), but interpreted as portrait by the app. Even though my Galaxy Tab was a tablet, it's default orientation was portrait, so there was no 90 degre skew. I have read enough to know that it's possible to change the Android system default value, but it has to be changed in the framework . . . No easy task, especially if the rom is ODEXed.
So . . . anyone have any advice or fix so my paid apps aren't wasted money? I don't think emailing every single developer is the key, when I could modify a single system value to fix the problem for all apps. Thanks in advance, any help is appreciated.
Doesnt ever gyro-based app/game have a recalibration setting? Have you tried that?
Send From My Samsung Galaxy S3 Using Tapatalk 2
GrayHat137 said:
So . . . anyone have any advice or fix so my paid apps aren't wasted money?
Click to expand...
Click to collapse
You could try Ultimate Rotation Control. It can have an individual setting for each application (Forced Portrait/Forced Landscape/Forced Auto).
ShadowLea said:
Doesnt ever gyro-based app/game have a recalibration setting? Have you tried that?
Send From My Samsung Galaxy S3 Using Tapatalk 2
Click to expand...
Click to collapse
The problem is that the data the app is getting is from the sensors is rotated 90 degrees. For example, if the app assumes the tilt data it is getting is from the left and right: tilt left, go left. On my tablet, it's default boot state is landscape, so if the app is asking for the sensor info the wrong way (a deprecated way - from before the Honeycomb API), it's getting the tilt axis from the top and bottom, so: tilt up, go left. I can calibrate, but I still have to tilt up to go left.
Sounds like badly programmed apps to me. Have you tried asking the devs to update based on the correct APIs?
HeartWare42 said:
You could try Ultimate Rotation Control[/URL]. It can have an individual setting for each application (Forced Portrait/Forced Landscape/Forced Auto).
Click to expand...
Click to collapse
I had hoped it would override the default framework, but apps were still polling the sensors wrong no matter which orientation they were displayed in. The sensor data was rotating the same amount as the app, but the original sensor data was still originally off by 90%.
Thanks for the tip; Ultimate Rotation Control is a good app that solved another issue I had, just not this one.
sbdags said:
Sounds like badly programmed apps to me. Have you tried asking the devs to update based on the correct APIs?
Click to expand...
Click to collapse
Yes, that's the consensus. Some I've asked, others are no longer in active development (nostalgia for holding onto these apps). I stumbled upon a web hit while googling for answers, the solution was about changing a simple setting in the android framework, but I'm a not experienced with ADB, and things like ODEXing and DeODEXing are nerve-wracking while I learn and experiment.
Also, thanks for coming sbdags. Running Xenogenesis since late April, fantastic job! :good:
GrayHat137 said:
Yes, that's the consensus. Some I've asked, others are no longer in active development (nostalgia for holding onto these apps). I stumbled upon a web hit while googling for answers, the solution was about changing a simple setting in the android framework, but I'm a not experienced with ADB, and things like ODEXing and DeODEXing are nerve-wracking while I learn and experiment.
Also, thanks for coming sbdags. Running Xenogenesis since late April, fantastic job! :good:
Click to expand...
Click to collapse
Which part of the framework do you need to change?
sbdags said:
Which part of the framework do you need to change?
Click to expand...
Click to collapse
Navigate to the androidpolicy\com\android\internal\policy\impl folder and open PhoneWindowManager.smali in your favorite text editor (Notepad++ is my favorite)
Search for the method "rotationfororientation"
(Picture of code here)
Make note of the variables (v#) for portrait and landscape (in my case portrait is v5)
Scroll to the end of the method and you should find something like:
"move v2, v5" (make sure it's the last move command before the end of the method)
Change the second variable (in this case v5) to whatever orientation you wish to be default. In my case I have set portrait as the default orientation.
Click to expand...
Click to collapse
There are other steps, but this is the only variable changed. I can't post links yet, and I didn't want to copy all of the text there, but that's it. The attached picture is the picture of the code.
Eureka!
GrayHat137 said:
There are other steps, but this is the only variable changed. I can't post links yet, and I didn't want to copy all of the text there, but that's it. The attached picture is the picture of the code.
Click to expand...
Click to collapse
Dear friends,
As I was also facing the same problem in my Ubislate 7C+(EDGE) tab by DATAWIND. While reading your post an idea struck to my mind. With the help of Root Browser app I navigated to /system/build.prop, opened it in text editor and in "ADDITIONAL_BUILD_PROPERTIES" changed the value of "ro.sf.hwrotation=270" 270 to 180 saved it and rebooted the tablet. Yes! the problem was solved but it created a new problem that the orientation of animation while boot and camera orientation has changed now but in order to rectify it I pulled bootanimation.zip to my computer and after unzipping it changed the orientation of animation files from portrait to landscape. Changed the orientation in 'desc.txt' from 480 800 to 800 400 and zipped both without any compression. Pushed it back to /system/media and changed the permission, user,group to original one with the help of root browser. Then for camera orientation with the help of root browser I navigated to /system/etc/camera.cfg opened it in RB text editor and changed camera orientation from 90 to 0, saved it and rebooted my tablet and now all the games using gsensor tilt are working fine.
Thanks,:good:
rotation gyro off
I had the same problemen, i resolved it by going to setting, location and then status (only GPS) then i started GPS tools , just waited a min or so . now everthing is oké again.
I hope thuis helps you

Categories

Resources