[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Image processing in Visual C++

Posted on 1998-08-14
1
Medium Priority
?
362 Views
Last Modified: 2013-11-20
I have managed to do thresholding and thinning to my image using visual C++. The problem is how should i display the image out again...the new image after thresholding?
0
Comment
Question by:cheeonn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 60 total points
ID: 1320790
You haven't made clear where the image is

If it's in a CBitmap/HBITMAP use BitBlt/StretchBlt

If it's in a DIB convert it to a CBitmap/HBITMAP (there are samples called DIB*.CPP that come with the MS VC compiler)

If it's in an Image list, use the draw method.

If it's in a block of memory, convert it to a DIB, then convert it to an HBITMAP/CBitmap then paint it.

You probably want to doing the painting in OnDraw in your view

My suggestion would be to create an extra memory bitmap, and paint this to the view in OnDraw.  Whenever the working image changes update the memory bitmap and force a repaint on the view,  InvalidateRect(NULL,FALSE) then UpdateWindow() on the view.  This avoids have to reprocess the image just to redraw the screen.

If you're short of memory or your bitmap is very large either (i) skip the memory bitmap, or (ii) Make the memory bitmap just screen sized (i.e. the visible/zoomed part of the image) and stretchblt the true image on to it.

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question