Hello,

It seems to be true that it because restricted memory
size. I am having the same problem too with all of
you. I am currently doing GIF decompressor. Only Small
gif image can be loaded and it sometimes got some
distortion. For bigger dimension, it always comes with
'fatal exception' or 'word non alignment'.
Is there anyone who can help how to fix it properly? 


Peter Alex

--- "Hays, Jonathan (GE Infrastructure)"
<[EMAIL PROTECTED]> wrote:
> What is your variable type for i?  If it is a
> two-byte variable (UInt16 or Int16), then your
> variable will wrap.
> The max value for a UInt16 is 65535, and in your
> code you are counting to 76800 (320 * 240).  So, if
> i is a two-byte variable once you get to the 65535th
> pixel, you will start over again at the zeroth
> pixel.  (Is zeroth even a word?)
> =)
> 
> -Jon
> 
> --------------------------------------------
> Jonathan Hays
> Palm OS Certified Developer
> http://hazelware.luggle.com
> --------------------------------------------
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
>
[mailto:[EMAIL PROTECTED]
> Behalf Of Keyur
> Patwa
> Sent: Thursday, April 08, 2004 4:05 PM
> To: Palm Developer Forum
> Subject: Image resolution problem!
> 
> 
> 
> 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/
> 
> --
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/


__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

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

Reply via email to