Discussion:
Android pics inverted when taking with front camera (started via intent)
user123
2012-07-30 12:59:02 UTC
Permalink
I have the same problem described here: Android Front Facing Camera Taking
Inverted Photos<http://stackoverflow.com/questions/10283467/android-front-facing-camera-taking-inverted-photos>

What's different in my case is that I'm starting the camera app via intent,
not implementing it myself. So probably no way to use CameraInfo or the
like. How can I solve this?

In order to summarize: When starting camera via intent and take the picture
using front camera, the returned bitmap is rotated by 180°.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
bob
2012-07-30 13:50:52 UTC
Permalink
Rotated 180 degrees or flipped horizontally? The latter seems more
probable.
Post by user123
I have the same problem described here: Android Front Facing Camera
Taking Inverted Photos<http://stackoverflow.com/questions/10283467/android-front-facing-camera-taking-inverted-photos>
What's different in my case is that I'm starting the camera app via
intent, not implementing it myself. So probably no way to use CameraInfo or
the like. How can I solve this?
In order to summarize: When starting camera via intent and take the
picture using front camera, the returned bitmap is rotated by 180°.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
user123
2012-07-30 14:12:47 UTC
Permalink
Uhm... don't remember. Is there a solution for any of the cases? I'll check
it again.
Post by bob
Rotated 180 degrees or flipped horizontally? The latter seems more
probable.
Post by user123
I have the same problem described here: Android Front Facing Camera
Taking Inverted Photos<http://stackoverflow.com/questions/10283467/android-front-facing-camera-taking-inverted-photos>
What's different in my case is that I'm starting the camera app via
intent, not implementing it myself. So probably no way to use CameraInfo or
the like. How can I solve this?
In order to summarize: When starting camera via intent and take the
picture using front camera, the returned bitmap is rotated by 180°.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
bob
2012-07-30 19:12:47 UTC
Permalink
I believe I have seen it flipped horizontally in the camera app on my Ice
Cream Sandwich.


If I was coding, I would just flip it again horizontally to get it back to
normal.


Or, I would just ignore it as most people are taking pictures of their
faces, which are usually somewhat symmetric.
Post by user123
Uhm... don't remember. Is there a solution for any of the cases? I'll
check it again.
Post by bob
Rotated 180 degrees or flipped horizontally? The latter seems more
probable.
Post by user123
I have the same problem described here: Android Front Facing Camera
Taking Inverted Photos<http://stackoverflow.com/questions/10283467/android-front-facing-camera-taking-inverted-photos>
What's different in my case is that I'm starting the camera app via
intent, not implementing it myself. So probably no way to use CameraInfo or
the like. How can I solve this?
In order to summarize: When starting camera via intent and take the
picture using front camera, the returned bitmap is rotated by 180°.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Dusk Jockeys Android Apps
2012-07-31 04:23:36 UTC
Permalink
When you are taking photos of yourself in the front camera, people
naturally expect to see the same as if they look in a mirror, so the
preview is flipped horizontally. Writing is reversed etc.

When the photo is taken, it then takes the real image, without the
flipping, so you dont get reversed writing. So it is the preview that is
"wrong", not the final image.
Post by bob
I believe I have seen it flipped horizontally in the camera app on my Ice
Cream Sandwich.
If I was coding, I would just flip it again horizontally to get it back to
normal.
Or, I would just ignore it as most people are taking pictures of their
faces, which are usually somewhat symmetric.
Post by user123
Uhm... don't remember. Is there a solution for any of the cases? I'll
check it again.
Post by bob
Rotated 180 degrees or flipped horizontally? The latter seems more
probable.
Post by user123
I have the same problem described here: Android Front Facing Camera
Taking Inverted Photos<http://stackoverflow.com/questions/10283467/android-front-facing-camera-taking-inverted-photos>
What's different in my case is that I'm starting the camera app via
intent, not implementing it myself. So probably no way to use CameraInfo or
the like. How can I solve this?
In order to summarize: When starting camera via intent and take the
picture using front camera, the returned bitmap is rotated by 180°.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
user123
2012-08-01 11:16:07 UTC
Permalink
Sorry, I had this problem mixed with a fix I was trying out for other
camera issue, and the description is not quite correct. But still a problem.

What happens is this:

The pic is displayed mirrored, horizontally, on the camera preview. That's
fine.

But when I "pick up" the bytes the camera activity stored in the path I
passed via:

cameraIntent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
Uri.fromFile(new File("myimgpath.jng")));

and build a bitmap again with them, the bitmap is rotated 90°.

I don't see a way to hardcode a fix for this, since with the back camera it
doesn't happen, and I don't know if the returned bitmap was taken using
front or back camera... any idea?
Post by Dusk Jockeys Android Apps
When you are taking photos of yourself in the front camera, people
naturally expect to see the same as if they look in a mirror, so the
preview is flipped horizontally. Writing is reversed etc.
When the photo is taken, it then takes the real image, without the
flipping, so you dont get reversed writing. So it is the preview that is
"wrong", not the final image.
Post by bob
I believe I have seen it flipped horizontally in the camera app on my Ice
Cream Sandwich.
If I was coding, I would just flip it again horizontally to get it back
to normal.
Or, I would just ignore it as most people are taking pictures of their
faces, which are usually somewhat symmetric.
Post by user123
Uhm... don't remember. Is there a solution for any of the cases? I'll
check it again.
Post by bob
Rotated 180 degrees or flipped horizontally? The latter seems more
probable.
Post by user123
I have the same problem described here: Android Front Facing Camera
Taking Inverted Photos<http://stackoverflow.com/questions/10283467/android-front-facing-camera-taking-inverted-photos>
What's different in my case is that I'm starting the camera app via
intent, not implementing it myself. So probably no way to use CameraInfo or
the like. How can I solve this?
In order to summarize: When starting camera via intent and take the
picture using front camera, the returned bitmap is rotated by 180°.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
user123
2012-08-01 11:18:22 UTC
Permalink
Btw. testing on a Samsung Galaxy S. Also have a HTC Desire here but it
doesn't have front camera.
Post by user123
Sorry, I had this problem mixed with a fix I was trying out for other
camera issue, and the description is not quite correct. But still a problem.
The pic is displayed mirrored, horizontally, on the camera preview. That's
fine.
But when I "pick up" the bytes the camera activity stored in the path I
cameraIntent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
Uri.fromFile(new File("myimgpath.jng")));
and build a bitmap again with them, the bitmap is rotated 90°.
I don't see a way to hardcode a fix for this, since with the back camera
it doesn't happen, and I don't know if the returned bitmap was taken using
front or back camera... any idea?
Post by Dusk Jockeys Android Apps
When you are taking photos of yourself in the front camera, people
naturally expect to see the same as if they look in a mirror, so the
preview is flipped horizontally. Writing is reversed etc.
When the photo is taken, it then takes the real image, without the
flipping, so you dont get reversed writing. So it is the preview that is
"wrong", not the final image.
Post by bob
I believe I have seen it flipped horizontally in the camera app on my
Ice Cream Sandwich.
If I was coding, I would just flip it again horizontally to get it back
to normal.
Or, I would just ignore it as most people are taking pictures of their
faces, which are usually somewhat symmetric.
Post by user123
Uhm... don't remember. Is there a solution for any of the cases? I'll
check it again.
Post by bob
Rotated 180 degrees or flipped horizontally? The latter seems more
probable.
Post by user123
I have the same problem described here: Android Front Facing Camera
Taking Inverted Photos<http://stackoverflow.com/questions/10283467/android-front-facing-camera-taking-inverted-photos>
What's different in my case is that I'm starting the camera app via
intent, not implementing it myself. So probably no way to use CameraInfo or
the like. How can I solve this?
In order to summarize: When starting camera via intent and take the
picture using front camera, the returned bitmap is rotated by 180°.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
user123
2012-08-01 12:20:00 UTC
Permalink
Ah, wait, I maybe know what the problem is. The pic was taken holding the
device "portrait", but, since the camera app seems only to support
landscape mode, this picture is actually originally rotated 90°. Wondering
why then I see the preview rotated "correctly"... But that's not important,
I guess.

When I take the pics holding the device "landscape" the resulting pic has
the "correct" rotation.
Post by user123
Btw. testing on a Samsung Galaxy S. Also have a HTC Desire here but it
doesn't have front camera.
Post by user123
Sorry, I had this problem mixed with a fix I was trying out for other
camera issue, and the description is not quite correct. But still a problem.
The pic is displayed mirrored, horizontally, on the camera preview.
That's fine.
But when I "pick up" the bytes the camera activity stored in the path I
cameraIntent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,
Uri.fromFile(new File("myimgpath.jng")));
and build a bitmap again with them, the bitmap is rotated 90°.
I don't see a way to hardcode a fix for this, since with the back camera
it doesn't happen, and I don't know if the returned bitmap was taken using
front or back camera... any idea?
Post by Dusk Jockeys Android Apps
When you are taking photos of yourself in the front camera, people
naturally expect to see the same as if they look in a mirror, so the
preview is flipped horizontally. Writing is reversed etc.
When the photo is taken, it then takes the real image, without the
flipping, so you dont get reversed writing. So it is the preview that is
"wrong", not the final image.
Post by bob
I believe I have seen it flipped horizontally in the camera app on my
Ice Cream Sandwich.
If I was coding, I would just flip it again horizontally to get it back
to normal.
Or, I would just ignore it as most people are taking pictures of their
faces, which are usually somewhat symmetric.
Post by user123
Uhm... don't remember. Is there a solution for any of the cases? I'll
check it again.
Post by bob
Rotated 180 degrees or flipped horizontally? The latter seems more
probable.
Post by user123
I have the same problem described here: Android Front Facing Camera
Taking Inverted Photos<http://stackoverflow.com/questions/10283467/android-front-facing-camera-taking-inverted-photos>
What's different in my case is that I'm starting the camera app via
intent, not implementing it myself. So probably no way to use CameraInfo or
the like. How can I solve this?
In order to summarize: When starting camera via intent and take the
picture using front camera, the returned bitmap is rotated by 180°.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Loading...