Re: Error 480 - can't create autoredraw image



I'm trying to do a simple crop by
loading a JPG into a picturebox,
then PaintPicture to a second box
with size set to the crop region.

Very simple. It works fine but fails
on certain images. The one picture
I have that fails is 2500 x 1700 pixels
(approx.), from a digital camera. And
other pics saved from the same camera
seem to fail, even though they open
fine in IrfanView or PaintShopPro.

Is the picture just too big? Should I do it
a different way?

VB's back-buffer implementation uses a Device Dependant Bitmap (DDB) to store the image data, which is quite limited in
how large it can be made. On older OS' this used to be ~16mb uncompressed data size, on later OS this has been expended
but is still quite restrictive.
The image you describe would take just over 16mb uncompressed space at 32-bit so this looks like it's hitting that
boundary.
A workaround for this is to use a Device Dependant Bitmap (DIB) and manage the GDI resources yourself, have a look at
the DIB article on my site for an example of how to work with them.
Hope this helps,

Mike


- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/


.



Relevant Pages

  • Re: What are you working on?
    ... ugly quilt still keeps somebody warm. ... If all else fails, ... Would posting a picture of the image I'm contemplating help? ...
    (rec.crafts.textiles.quilting)
  • Re: send pictures via email stopped working
    ... and it still fails. ... After you click on resize the window closes and you can ... > starts the dialog for sizing the picture but never starts Outlook> Express ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Error 480 - cant create autoredraw image
    ... autoredraw creates a memory copy of the image, so if a window is covered ... the image loaded into the picture box is just drawn on the device ... when you place another window overtop, ... I have that fails is 2500 x 1700 pixels ...
    (microsoft.public.vb.general.discussion)
  • Re: PhotoStory 3 Install problem
    ... It fails trying to create the "My Music" directory under the all users ... > You Try to Install Microsoft Plus! ... > Picture It! ... > Digital Image Support Center ...
    (microsoft.public.windowsxp.moviemaker)