Hi guys,

I am basically working on image processing with Tre0 600.

When I am capturing 160*120 resolution image its returing good data but
when I am trying to capture heigher resolution 
image, like 320*240 or 640*480, I am not getting correct data.

Is it like, with heigher resolution it stores data in different fashion?
Please let me know if anybody has any idea about this!

Following is the code I am using to capture image,

        bitmapP = BmpCreate(320,240,previewDepth,0,&err);
        
        if (bitmapP)
        {
          bmpData = (UInt16 *) BmpGetBits (bitmapP);    
          // Initializing the image to a white image. 
          for (i=0; i<320*240; i++)
          {
                *(bmpData + i) = 0x0000;
          }
          // Capturing the image 
          err = CameraLibPreview (gLibRefNum, bmpData, 
                  kCameraImageFormatRGB16, 320, 240);     
          if (!err)
          {
                  WinDrawBitmap (bitmapP, previewLeft, previewTop);
          }
          else
          {
                FrmCustomAlert(ErrorAlert, "Capture Error:", NULL,
NULL);
          }
        }

This is how I am printing a line of data,
        
        Char *p,*q;
        UInt32 k = 320*120;
        
        for(i=k;i<k+320; i++)
        {
                p = StrIToA(q,bmpData[i]);
                FrmCustomAlert(ErrorAlert,p, NULL, NULL);
        }

As I said, the above code prints good data with 160*120 but doesn't seem
to work fine with heigher resolutions.
Please reply,
Keyur.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to