开发者

image coming out scrambled from camera on Thunderbolt & G2?

When i use the camera.takePicture, this is what i get, ONLY from the HTC G2 and T开发者_JAVA技巧hunderbolt, it works fine on every other phone i've tried(EVO, Nexus One, Samsung Galaxy S, Droid, Droid X, etc....) anybody got any ideas? i can tell it's what i'm taking a picture of, it's just coming back all scrambled???

image coming out scrambled from camera on Thunderbolt & G2?


I think this is issue with the rotation.

Firstly try to rotate bitmap (90, 180, 270 degrees) to get normal image on HTC phones and localize the problem.

Secondly you could try to use this (it's just idea):

  @TargetApi(9)
  public int getCameraOrientation(int paramInt1, int paramInt2)
  {
    int i = 90;
    if (isFrontFacing(paramInt1));
    switch (paramInt2)
    {
    default:
      i = this.mInfo[paramInt1].orientation;
    case 0:
    case 180:
    case 90:
    case 270:
    }
    while (true)
    {
      return i;
      i = 270;
      continue;
      i = 270;
    }
  }

  public int getRenderOrientation(int paramInt1, int paramInt2)
  {
    return paramInt2;
  }

  public boolean shouldRenderMirrored(int paramInt)
  {
    return false;
  }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜