Click here to Skip to main content
16,014,706 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to add combo boc control to a list view Pin
Furty12-Feb-03 18:50
Furty12-Feb-03 18:50 
GeneralPassing Properties as paramaters Pin
mgarwood12-Feb-03 2:28
mgarwood12-Feb-03 2:28 
GeneralRe: Passing Properties as paramaters Pin
Diego Mijelshon12-Feb-03 2:46
Diego Mijelshon12-Feb-03 2:46 
GeneralRe: Passing Properties as paramaters Pin
leppie12-Feb-03 7:13
leppie12-Feb-03 7:13 
GeneralProblem with a Very Large Bitmap Pin
Mohammad Siahatgar12-Feb-03 2:07
Mohammad Siahatgar12-Feb-03 2:07 
GeneralRe: Problem with a Very Large Bitmap Pin
leppie12-Feb-03 7:52
leppie12-Feb-03 7:52 
GeneralRe: Problem with a Very Large Bitmap Pin
Mohammad Siahatgar14-Feb-03 0:43
Mohammad Siahatgar14-Feb-03 0:43 
GeneralRe: Problem with a Very Large Bitmap Pin
Danny2814-Feb-03 2:55
Danny2814-Feb-03 2:55 
Hi,


yes, Photoshop can handle that due to the fact Photoshop implements an own "image-subdivisioning", so it also breaks the image into smaller parts the GDI can handle.

So, if you only want to "break" the image in smaller pieces, I would suggest to you save the image in an easy file-format (e.g. "RAW", "PCX" or whatever you like) and read it completely yourself (means "forget c#, gdi and gdi+ for loading" because that will try to allocate the memory for the COMPLETE image, what's in fact your real problem).

Then if you open the raw file (with your code using 'normal' file-reading using input-streams), you need to decide it how you want to break it. If your image (for example) is in RGB-format, the filesize of the RAW (saved in PShop with "no header") will be imageWidth*imageHeight*3. When you open it, the first imageWidth*3 bytes will be the first scanline of the image (either in RGB or BGR-order, I forget that, but you will realize, don't worry).

If you would decide to break it into smaller pieces of e.g. 100*100 pixels, you need to allocate imageWidth/100 (plus one if imageWidth not dividable by 100 without rest), then read the first scanline (and only the first scanline) and copy the pixeldata into the first scanline of the "piece"-images (first "piece"-image gets the first 100 pixels of scanline, seconds 100 pixels from x=100 to x=199 and so on). If you have read 100 scanlines of the original big-sized image (which is the height of one "piece"-image), you can save the pieces-images to disc (in any other format) and reallocate new piece-images. Then continue until you did that for every scanline within the original image.

But this will only help if you only want to "break" the image in pieces. If you want to display them, you need the information which pieces of the image will be visible and load only them (otherwise the behaviour of your code will strongly depend on settings like virtual memory and so on) and display only them.

hope this helps,
greets,
Danny
GeneralControl in C# Pin
Member 1697711-Feb-03 22:57
Member 1697711-Feb-03 22:57 
GeneralRe: Control in C# Pin
Nnamdi Onyeyiri12-Feb-03 5:32
Nnamdi Onyeyiri12-Feb-03 5:32 
GeneralRe: Control in C# Pin
Member 1697712-Feb-03 22:33
Member 1697712-Feb-03 22:33 
GeneralRe: Control in C# Pin
Nnamdi Onyeyiri13-Feb-03 4:57
Nnamdi Onyeyiri13-Feb-03 4:57 
GeneralBorder style of combo box Pin
chito11-Feb-03 22:10
chito11-Feb-03 22:10 
GeneralRe: Border style of combo box Pin
Furty12-Feb-03 18:52
Furty12-Feb-03 18:52 
QuestionControl Library, .net BUG ? Pin
Braulio Dez11-Feb-03 22:04
Braulio Dez11-Feb-03 22:04 
Generaltest desktop bob Pin
caoxiongkun11-Feb-03 21:10
caoxiongkun11-Feb-03 21:10 
GeneralCOM+! Pin
sss_dr11-Feb-03 20:45
sss_dr11-Feb-03 20:45 
QuestionHow to print the content of richtextbox control... Pin
zhoujun11-Feb-03 20:35
zhoujun11-Feb-03 20:35 
AnswerRe: How to print the content of richtextbox control... Pin
Furty11-Feb-03 21:57
Furty11-Feb-03 21:57 
GeneralPlease introduce me some samplecodes or tutorialls about... Pin
zhoujun11-Feb-03 20:21
zhoujun11-Feb-03 20:21 
GeneralRe: Please introduce me some samplecodes or tutorialls about... Pin
567890123412-Feb-03 3:02
567890123412-Feb-03 3:02 
QuestionCan crystal reports in visual studio .net... Pin
zhoujun11-Feb-03 20:14
zhoujun11-Feb-03 20:14 
Generalwhats a easy way to change the color of Specific word in rtf field Pin
jtmtv1811-Feb-03 19:18
jtmtv1811-Feb-03 19:18 
QuestionHow to pass values to crystal reports viewer's parameterfield? Pin
zhoujun11-Feb-03 16:17
zhoujun11-Feb-03 16:17 
GeneralRe: Implementing Carlos Perez's C# Enhanced Progress Bar Control Pin
leppie11-Feb-03 9:52
leppie11-Feb-03 9:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.