Click here to Skip to main content
15,906,645 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multithreaded TCP server, client thread termination Pin
Kuniva18-Nov-03 6:42
Kuniva18-Nov-03 6:42 
GeneralQuickie about window z ordering Pin
srev15-Nov-03 2:05
srev15-Nov-03 2:05 
GeneralRe: Quickie about window z ordering Pin
Antti Keskinen15-Nov-03 15:08
Antti Keskinen15-Nov-03 15:08 
GeneralRe: Quickie about window z ordering Pin
Peter Molnar15-Nov-03 15:21
Peter Molnar15-Nov-03 15:21 
GeneralA question about reading and processing very large image Pin
swandream15-Nov-03 0:09
swandream15-Nov-03 0:09 
GeneralRe: A question about reading and processing very large image Pin
Peter Molnar15-Nov-03 15:26
Peter Molnar15-Nov-03 15:26 
GeneralRe: A question about reading and processing very large image Pin
swandream15-Nov-03 20:19
swandream15-Nov-03 20:19 
GeneralRe: A question about reading and processing very large image Pin
Peter Molnar16-Nov-03 5:08
Peter Molnar16-Nov-03 5:08 
You say you wanna display an image of 20k pixels x 20k pixels, and your user's screen resolution is only 1k x 1k pixels (just for simplicity) (GetDeviceCaps gives the current resolution) then you can

1.
display the pic in its original size (i.e.:20k x 20k). Of course the user will see only a tiny part of it in 1k x 1k (1/400th part), and he can use the scrollbar to navigate it.
In this way you keep all the pic in memory, so your user will have more memory than your pic consumes, in order to be able to use you program efficiently.

2.
read in 20 pixels from file both horizontally and vertically, and make 1 pixel out of it according to an algorithm (maybe taking the average of RGB values), and this about 1 million (=1k x 1k) times.
So you will be able to construct and show a 1k x 1k image out of a 20k x 20k image. This pic will fit the user's screen.
This method does not consume memory but enormously consumes CPU capacity.

3.
Another method would be if you read in from file every 20th pixel both horizontally and vertically (ignoring 19 out of 20 pixels), and show only the 1k x 1k image in this way.
This mehtod does consume neither memory nor CPU, but this image shows 20x20 = 400 times less data (i.e.:resemblance) with the original 20k x 20k pic. Could be a good way if you have pics with large homogenous areas.

Whatever way you choose, you have to make sacrifices, because of the confines of the current Win32 system. I am sure there will be no sacrifices with Win128 or Win256, but it entails some sacrifices of time...


Peter Molnar
GeneralRe: A question about reading and processing very large image Pin
swandream16-Nov-03 14:32
swandream16-Nov-03 14:32 
GeneralRe: A question about reading and processing very large image Pin
Todd Smith17-Nov-03 7:12
Todd Smith17-Nov-03 7:12 
GeneralThread exist or not Pin
Boby.George14-Nov-03 23:26
professionalBoby.George14-Nov-03 23:26 
GeneralRe: Thread exist or not Pin
Peter Molnar15-Nov-03 15:31
Peter Molnar15-Nov-03 15:31 
GeneralTimer / Waiting Question Pin
Steve Messer14-Nov-03 22:02
Steve Messer14-Nov-03 22:02 
GeneralRe: Timer / Waiting Question Pin
Prakash Nadar15-Nov-03 1:04
Prakash Nadar15-Nov-03 1:04 
GeneralRe: Timer / Waiting Question Pin
Steve Messer15-Nov-03 5:08
Steve Messer15-Nov-03 5:08 
GeneralRe: Timer / Waiting Question Pin
Ravi Bhavnani15-Nov-03 2:57
professionalRavi Bhavnani15-Nov-03 2:57 
GeneralRe: Timer / Waiting Question Pin
Steve Messer15-Nov-03 5:14
Steve Messer15-Nov-03 5:14 
Questionhow Can I operate the graph9 in WORD Pin
Jim Chan14-Nov-03 20:33
Jim Chan14-Nov-03 20:33 
GeneralC++ Question. Pin
WREY14-Nov-03 20:23
WREY14-Nov-03 20:23 
GeneralRe: C++ Question. Pin
Rickard Andersson2015-Nov-03 0:31
Rickard Andersson2015-Nov-03 0:31 
GeneralRe: C++ Question. Pin
Prakash Nadar15-Nov-03 1:00
Prakash Nadar15-Nov-03 1:00 
GeneralRe: C++ Question. Pin
Rickard Andersson2015-Nov-03 1:10
Rickard Andersson2015-Nov-03 1:10 
GeneralRe: C++ Question. Pin
WREY15-Nov-03 7:15
WREY15-Nov-03 7:15 
GeneralRe: C++ Question. Pin
WREY15-Nov-03 7:09
WREY15-Nov-03 7:09 
GeneralRe: C++ Question. Pin
Kevin McFarlane15-Nov-03 4:12
Kevin McFarlane15-Nov-03 4:12 

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.