Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
3.00/5 (3 votes)
See more:
Hi All,

I want to create large size image size more than 32000x32000 pixels .

Any idea how to create very large size image.

After creating that huge size image I want to load it into c# picture box . Normal size image easily loaded but what to do when I have huge(large size image)

Please help me.

Thanks in Advance.


[edit]DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously. Shouting won't change the laws of physics (or the laws of .NET) - OriginalGriff[/edit]
Posted
Updated 27-Jun-11 1:33am
v5
Comments
esmailian 27-Jun-11 3:16am    
program or a pic create with phothoshop?
CPallini 27-Jun-11 3:28am    
I'm worried about the monitor you have to see such image.
CPallini 27-Jun-11 3:29am    
What is the purpose of creating such a big image (there may be better alternatives)?
prog786 27-Jun-11 4:42am    
i want to create pic (image of huge size)
OriginalGriff 27-Jun-11 7:31am    
Read my answer: You cannot load an image of that size into any C# control.
.NET has a maximum size of any single object of 2GB - your image exceeds that by at least a factor of two.
(And this is ignoring that even if you could, a Picturebox would be a very dumb way to display such a big image!)

First thing: forget C#, forget any managed language: an image of 32000x32000 has 1,024,000,000 pixels, which means 4,096,000,000 bytes. This is too big for a single object in .NET which has a maximum size of 2GB.

You may be able to do it in native C++, but it will be slow, slow, slow to work with...
 
Share this answer
 
Comments
[no name] 27-Jun-11 7:24am    
Good Call. My 5 too.
This question require a lot of memory, at this rate you have to break that picture into small and managable pieces. This approach also require memory managment and using helper memory(s).

The key point is breaking & sampling (divide and conquer approach). If you wanna display 1000x1000 in view port sized 100x100 your have to display and 1/10 of pixels.

Try creating Blocks and Block Manager and ViewPort
 
Share this answer
 
on my 64 bit machine (4gb ram), there was no problem witch pictures upto 16000x16000. above this values, the performance breakdown was .... tremendous. maybe it would work with enough memory.

furthermore, for the moment, when the bitmap is assigned to the picturebox image, it seems he needs the memory TWICE - with large pictures i observed a short memory peak of about double the size of the picture ...
 
Share this answer
 
Youp need to look at tiled image formats; you cannot just load an image of that size as a whole!

You have to find a way to load only sections of the image in memory to be able to display it.

Usually the image is split in tiles, each tile is a determined size (optimized for fast loading), and when you want to display the image in a region of the screen, you load the appropriate tiles corresponding to that section of the image.

I know TIFF offer that feature as well as other types of format; but you will need to do some work yourself.


Deep Zoom file format (msdn) [^]

Adding_Tiling_to_Your_Application.html[^]

Max.
 
Share this answer
 
Comments
[no name] 27-Jun-11 7:24am    
Nice Link.My 5 too.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900