Re: Loading image byte array
- From: "Frank Hileman" <frankhil@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 2 Feb 2007 09:08:48 -0800
Hi Andreas,
Yes, the double memory is the tradeoff with using the built-in bitmap file
reader. We can hope that if the file format is compressed, the first bitmap
will be smaller than the second (the second is fully uncompressed). Also, if
you care about speed, I don't recommend PictureBox, but a Control-derived
class and paint a portion of the bitmap directly on that.
Regards,
Frank Hileman
"Andreas" <dont.need@xxxxxxx> wrote in message
news:upiGMkqRHHA.1860@xxxxxxxxxxxxxxxxxxxxxxx
Thanks Frank, I actually got it working myself before I saw your code. I
load the my image like Michael Phillips suggested. Sure I'm currently
limited to BMP fileformat but that can be changed. Wouldnt your method
mean I would your method mean I would, for a moment, have two bitmaps at
the same time? If I use large images then this will eat memory for sure.
The one advantage with your method is that I will be able to use various
fileformats "out of the box" and don't need to make my own file format
parsers (BMP was easy, but I fear PNG; JPG and GIF can be a bit tricker).
"Frank Hileman" <frankhil@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> skrev i
meddelandet news:%23RIeYmlRHHA.4632@xxxxxxxxxxxxxxxxxxxxxxx
Load it first into a Bitmap as usual. You will know the width and height
at that point Then create a Graphics using a fast-access second bitmap
(we call it EffectBuffer), and render into that second bitmap using
DrawImageUnscaled. Dispose the first Bitmap.
Also I just posted some more information on the fast access technique in
the original thread.
.
- References:
- Re: Loading image byte array
- From: Frank Hileman
- Re: Loading image byte array
- From: Andreas
- Re: Loading image byte array
- Prev by Date: Re: vb.net Multipage TIFF
- Next by Date: Re: Antialiasing rendering of metafile images
- Previous by thread: Re: Loading image byte array
- Next by thread: Print high-res control to printer
- Index(es):
Relevant Pages
|