Home All Groups Group Topic Archive Search About

Imaging component for viewing very large JPG's?

Author
28 Oct 2007 8:51 PM
Ed Sonneveld
I'm searching for a component which is able to show very large JPG images
(sometimes more than 30 MB). These are professional scans of large drawings
from an archive.

I tried DotImage from Atalasoft, but it needs to map a huge block of memory
for displaying the image, which often results in memory problems. I am
looking for a component that displays the JPG without using so much memory
(if that is possible).

Any ideas are very welcome

Ed

Author
29 Oct 2007 4:31 AM
Andrew Faust
I don't know if you are going to be able to get away without using large
amounts of memory. I believe to display the image the JPG needs to get
decompressed and basically becomes  like a plain BMP in memory. You might
check in to Paint.Net. It's a very nice open source graphics application
built in .Net. You could dig in to the code and see what it's doing and
(license permitting) utilize some of it's code.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com


Show quote
"Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
news:4724f63b$0$242$e4fe514c@news.xs4all.nl...
> I'm searching for a component which is able to show very large JPG images
> (sometimes more than 30 MB). These are professional scans of large
> drawings from an archive.
>
> I tried DotImage from Atalasoft, but it needs to map a huge block of
> memory for displaying the image, which often results in memory problems.
> I am looking for a component that displays the JPG without using so much
> memory (if that is possible).
>
> Any ideas are very welcome
>
> Ed
>
>
>
Author
29 Oct 2007 12:28 PM
Ed Sonneveld
Hi Andrew,

Good idea, but paint.NET has memory problems as well with these images.

Ed

Show quote
"Andrew Faust" <and***@andrewfaust.com> wrote in message
news:A0DD6374-E51A-4269-9D9F-3144AB761E0A@microsoft.com...
>I don't know if you are going to be able to get away without using large
>amounts of memory. I believe to display the image the JPG needs to get
>decompressed and basically becomes  like a plain BMP in memory. You might
>check in to Paint.Net. It's a very nice open source graphics application
>built in .Net. You could dig in to the code and see what it's doing and
>(license permitting) utilize some of it's code.
>
> --
> Andrew Faust
> andrew[at]andrewfaust.com
> http://www.andrewfaust.com
>
>
> "Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
> news:4724f63b$0$242$e4fe514c@news.xs4all.nl...
>> I'm searching for a component which is able to show very large JPG images
>> (sometimes more than 30 MB). These are professional scans of large
>> drawings from an archive.
>>
>> I tried DotImage from Atalasoft, but it needs to map a huge block of
>> memory for displaying the image, which often results in memory problems.
>> I am looking for a component that displays the JPG without using so much
>> memory (if that is possible).
>>
>> Any ideas are very welcome
>>
>> Ed
>>
>>
>>
>
Author
29 Oct 2007 11:23 AM
Kevin Spencer
Hi Ed,

There are only a few possible ways to display an image, regardless of the
technology.  In most, all of the image pixels must be loaded into memory,
regardless of whether you display the entire image or not. The other
possible way is to approach the problem from one of 2 possible avenues. If
you don't have to display the entire image, you read only the pixels you
will be displaying. The other way is to keep the file open, and read the
pixels each time you paint the image, one set of bytes at a time. This
second method is definitely a performance killer, but it does cut down on
memory usage.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP



Show quote
"Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
news:4724f63b$0$242$e4fe514c@news.xs4all.nl...
> I'm searching for a component which is able to show very large JPG images
> (sometimes more than 30 MB). These are professional scans of large
> drawings from an archive.
>
> I tried DotImage from Atalasoft, but it needs to map a huge block of
> memory for displaying the image, which often results in memory problems. I
> am looking for a component that displays the JPG without using so much
> memory (if that is possible).
>
> Any ideas are very welcome
>
> Ed
>
>
>
Author
29 Oct 2007 12:34 PM
Ed Sonneveld
Hi Kevin,

Thanks for the info. The images must be displayed entirely. Coding this
stuff myself goes way beyond my knowledge, I'm mainly a winforms database
programmer.

Therefore I hoped that some components would work like irfanview or the
Windows XP 'picture and fax viewer', for example. These do not seem to have
memory problems. Too bad they cannot be used as components AFAIK.

- Ed

Show quote
"Kevin Spencer" <unclechut***@nothinks.com> wrote in message
news:Od29Y4hGIHA.3600@TK2MSFTNGP06.phx.gbl...
> Hi Ed,
>
> There are only a few possible ways to display an image, regardless of the
> technology.  In most, all of the image pixels must be loaded into memory,
> regardless of whether you display the entire image or not. The other
> possible way is to approach the problem from one of 2 possible avenues. If
> you don't have to display the entire image, you read only the pixels you
> will be displaying. The other way is to keep the file open, and read the
> pixels each time you paint the image, one set of bytes at a time. This
> second method is definitely a performance killer, but it does cut down on
> memory usage.
>
> --
> HTH,
>
> Kevin Spencer
> Chicken Salad Surgeon
> Microsoft MVP
>
>
>
> "Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
> news:4724f63b$0$242$e4fe514c@news.xs4all.nl...
>> I'm searching for a component which is able to show very large JPG images
>> (sometimes more than 30 MB). These are professional scans of large
>> drawings from an archive.
>>
>> I tried DotImage from Atalasoft, but it needs to map a huge block of
>> memory for displaying the image, which often results in memory problems.
>> I am looking for a component that displays the JPG without using so much
>> memory (if that is possible).
>>
>> Any ideas are very welcome
>>
>> Ed
>>
>>
>>
>
>
Author
30 Oct 2007 1:18 AM
Andrew Faust
Does it have to be displayed full size all the time? You could use a
graphics library (ImageMagick is nice) to create a scaled down version to
show by default. Then simply load the entire image if the user requests it.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com


Show quote
"Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
news:4725d36b$0$241$e4fe514c@news.xs4all.nl...
> Hi Kevin,
>
> Thanks for the info. The images must be displayed entirely. Coding this
> stuff myself goes way beyond my knowledge, I'm mainly a winforms database
> programmer.
>
> Therefore I hoped that some components would work like irfanview or the
> Windows XP 'picture and fax viewer', for example. These do not seem to
> have memory problems. Too bad they cannot be used as components AFAIK.
>
> - Ed
>
> "Kevin Spencer" <unclechut***@nothinks.com> wrote in message
> news:Od29Y4hGIHA.3600@TK2MSFTNGP06.phx.gbl...
>> Hi Ed,
>>
>> There are only a few possible ways to display an image, regardless of
>> the technology.  In most, all of the image pixels must be loaded into
>> memory, regardless of whether you display the entire image or not. The
>> other possible way is to approach the problem from one of 2 possible
>> avenues. If you don't have to display the entire image, you read only
>> the pixels you will be displaying. The other way is to keep the file
>> open, and read the pixels each time you paint the image, one set of
>> bytes at a time. This second method is definitely a performance killer,
>> but it does cut down on memory usage.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Chicken Salad Surgeon
>> Microsoft MVP
>>
>>
>>
>> "Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
>> news:4724f63b$0$242$e4fe514c@news.xs4all.nl...
>>> I'm searching for a component which is able to show very large JPG
>>> images (sometimes more than 30 MB). These are professional scans of
>>> large drawings from an archive.
>>>
>>> I tried DotImage from Atalasoft, but it needs to map a huge block of
>>> memory for displaying the image, which often results in memory
>>> problems. I am looking for a component that displays the JPG without
>>> using so much memory (if that is possible).
>>>
>>> Any ideas are very welcome
>>>
>>> Ed
>>>
>>>
>>>
>>
>>
>
>
Author
30 Oct 2007 8:11 AM
Ed Sonneveld
The image must always first be shown as 'fit to screen', and then, if the
user wants, be zoomed in.
I guess  making a 'on the fly' scaled down version with such a library may
take a while, or can that be done fast?

- Ed

Show quote
"Andrew Faust" <and***@andrewfaust.com> wrote in message
news:3FE77DEE-7D7A-46A7-96FB-120B6724549D@microsoft.com...
> Does it have to be displayed full size all the time? You could use a
> graphics library (ImageMagick is nice) to create a scaled down version to
> show by default. Then simply load the entire image if the user requests
> it.
>
> --
> Andrew Faust
> andrew[at]andrewfaust.com
> http://www.andrewfaust.com
>
>
> "Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
> news:4725d36b$0$241$e4fe514c@news.xs4all.nl...
>> Hi Kevin,
>>
>> Thanks for the info. The images must be displayed entirely. Coding this
>> stuff myself goes way beyond my knowledge, I'm mainly a winforms database
>> programmer.
>>
>> Therefore I hoped that some components would work like irfanview or the
>> Windows XP 'picture and fax viewer', for example. These do not seem to
>> have memory problems. Too bad they cannot be used as components AFAIK.
>>
>> - Ed
>>
>> "Kevin Spencer" <unclechut***@nothinks.com> wrote in message
>> news:Od29Y4hGIHA.3600@TK2MSFTNGP06.phx.gbl...
>>> Hi Ed,
>>>
>>> There are only a few possible ways to display an image, regardless of
>>> the technology.  In most, all of the image pixels must be loaded into
>>> memory, regardless of whether you display the entire image or not. The
>>> other possible way is to approach the problem from one of 2 possible
>>> avenues. If you don't have to display the entire image, you read only
>>> the pixels you will be displaying. The other way is to keep the file
>>> open, and read the pixels each time you paint the image, one set of
>>> bytes at a time. This second method is definitely a performance killer,
>>> but it does cut down on memory usage.
>>>
>>> --
>>> HTH,
>>>
>>> Kevin Spencer
>>> Chicken Salad Surgeon
>>> Microsoft MVP
>>>
>>>
>>>
>>> "Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
>>> news:4724f63b$0$242$e4fe514c@news.xs4all.nl...
>>>> I'm searching for a component which is able to show very large JPG
>>>> images (sometimes more than 30 MB). These are professional scans of
>>>> large drawings from an archive.
>>>>
>>>> I tried DotImage from Atalasoft, but it needs to map a huge block of
>>>> memory for displaying the image, which often results in memory
>>>> problems. I am looking for a component that displays the JPG without
>>>> using so much memory (if that is possible).
>>>>
>>>> Any ideas are very welcome
>>>>
>>>> Ed
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
Author
31 Oct 2007 2:20 AM
Andrew Faust
Honestly, I don't know how fast it will be to resize an image that large. I
do know, though, that ImageMagick should be able to do it pretty well as
fast as any other image library out there. It's a very mature open source
library. If it's possible you may want to do the resize only once and save
both the full and smaller sized images for faster display later on.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com


Show quote
"Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
news:4726e74b$0$237$e4fe514c@news.xs4all.nl...
> The image must always first be shown as 'fit to screen', and then, if the
> user wants, be zoomed in.
> I guess  making a 'on the fly' scaled down version with such a library
> may take a while, or can that be done fast?
>
> - Ed
>
> "Andrew Faust" <and***@andrewfaust.com> wrote in message
> news:3FE77DEE-7D7A-46A7-96FB-120B6724549D@microsoft.com...
>> Does it have to be displayed full size all the time? You could use a
>> graphics library (ImageMagick is nice) to create a scaled down version
>> to show by default. Then simply load the entire image if the user
>> requests it.
>>
>> --
>> Andrew Faust
>> andrew[at]andrewfaust.com
>> http://www.andrewfaust.com
>>
>>
>> "Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
>> news:4725d36b$0$241$e4fe514c@news.xs4all.nl...
>>> Hi Kevin,
>>>
>>> Thanks for the info. The images must be displayed entirely. Coding this
>>> stuff myself goes way beyond my knowledge, I'm mainly a winforms
>>> database programmer.
>>>
>>> Therefore I hoped that some components would work like irfanview or the
>>> Windows XP 'picture and fax viewer', for example. These do not seem to
>>> have memory problems. Too bad they cannot be used as components AFAIK.
>>>
>>> - Ed
>>>
>>> "Kevin Spencer" <unclechut***@nothinks.com> wrote in message
>>> news:Od29Y4hGIHA.3600@TK2MSFTNGP06.phx.gbl...
>>>> Hi Ed,
>>>>
>>>> There are only a few possible ways to display an image, regardless of
>>>> the technology.  In most, all of the image pixels must be loaded into
>>>> memory, regardless of whether you display the entire image or not. The
>>>> other possible way is to approach the problem from one of 2 possible
>>>> avenues. If you don't have to display the entire image, you read only
>>>> the pixels you will be displaying. The other way is to keep the file
>>>> open, and read the pixels each time you paint the image, one set of
>>>> bytes at a time. This second method is definitely a performance
>>>> killer, but it does cut down on memory usage.
>>>>
>>>> --
>>>> HTH,
>>>>
>>>> Kevin Spencer
>>>> Chicken Salad Surgeon
>>>> Microsoft MVP
>>>>
>>>>
>>>>
>>>> "Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
>>>> news:4724f63b$0$242$e4fe514c@news.xs4all.nl...
>>>>> I'm searching for a component which is able to show very large JPG
>>>>> images (sometimes more than 30 MB). These are professional scans of
>>>>> large drawings from an archive.
>>>>>
>>>>> I tried DotImage from Atalasoft, but it needs to map a huge block of
>>>>> memory for displaying the image, which often results in memory
>>>>> problems. I am looking for a component that displays the JPG without
>>>>> using so much memory (if that is possible).
>>>>>
>>>>> Any ideas are very welcome
>>>>>
>>>>> Ed
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
>
Author
31 Oct 2007 2:45 AM
Michael C
"Andrew Faust" <and***@andrewfaust.com> wrote in message
news:DC924D59-D557-4FAC-9DEC-6E7E6CCD2261@microsoft.com...
> Honestly, I don't know how fast it will be to resize an image that large.
> I do know, though, that ImageMagick should be able to do it pretty well as
> fast as any other image library out there. It's a very mature open source
> library. If it's possible you may want to do the resize only once and save
> both the full and smaller sized images for faster display later on.

It's worth noting that most good bitmap packages do this in some form.

Michael
Author
30 Oct 2007 1:52 AM
Michael C
"Ed Sonneveld" <esonnev***@sunbase.nl> wrote in message
news:4725d36b$0$241$e4fe514c@news.xs4all.nl...
> Hi Kevin,
>
> Thanks for the info. The images must be displayed entirely. Coding this
> stuff myself goes way beyond my knowledge, I'm mainly a winforms database
> programmer.
>
> Therefore I hoped that some components would work like irfanview or the
> Windows XP 'picture and fax viewer', for example. These do not seem to
> have memory problems. Too bad they cannot be used as components AFAIK.

This seems to be a very common question here, everyone is trying to load
100+MB images these days. A lot of programming models cater for this sort of
thing by streaming, right back to the early days (eg FTP). But for some
reason image compression general doesn't.

Michael

AddThis Social Bookmark Button