-
March 11th, 2014, 11:51 PM
#1
Using 2D Array - Displaying Bitmap Image with Scrolling
Hi,
My requirement is,
Read *.bmp image and displaying bitmap image with scrollbar in a MFC dialog application.
I was done using this
I was read the *.bmp image as a pixel data and stored by 2D Array,
Now i want to Display this 2D array as bitmap image with scrollbar separately in the same dialog. How can i display bitmap with scrollbar using 2D array?
Pls clear me.
Regards,
SaraswathiSrinath
-
March 12th, 2014, 01:54 AM
#2
Re: Using 2D Array - Displaying Bitmap Image with Scrolling
Originally Posted by saraswathisrinath
I was read the *.bmp image as a pixel data and stored by 2D Array,
Now i want to Display this 2D array as bitmap image
This is really bad idea. All you need is using LoadImage.
Best regards,
Igor
-
March 12th, 2014, 04:07 AM
#3
Re: Using 2D Array - Displaying Bitmap Image with Scrolling
Originally Posted by saraswathisrinath
Now i want to Display this 2D array as bitmap image with scrollbar separately in the same dialog. How can i display bitmap with scrollbar using 2D array?
As Igor already mentioned "read the *.bmp image as a pixel data and stored by 2D Array" is not a good idea.
And how to display a bitmap you could learn from this J.Newcomer's essay.
Victor Nijegorodov
-
March 12th, 2014, 04:17 AM
#4
Re: Using 2D Array - Displaying Bitmap Image with Scrolling
Originally Posted by Igor Vartanov
This is really bad idea.
My dialog size is 1024*768.
I want to display BMP image using stored *.bmp image or *.csv file from opendialog file path.
Using this image i prepared 2D array for further algorithm process and display the algorithm processed image also in the same dialog.
If my BMP image size is 1024*500, then i did not load both images(Real & Processed Image).
For this purpose only, i asked to display Scrollable bitmap images from various input(*.bmp/*.csv)
Regards,
SaraswathiSrinath
-
March 12th, 2014, 11:36 AM
#5
Re: Using 2D Array - Displaying Bitmap Image with Scrolling
Originally Posted by saraswathisrinath
My dialog size is 1024*768.
I want to display BMP image using stored *.bmp image or *.csv file from opendialog file path.
Whatever. In case you to operate with several graphical representations of anything you want, you better deal with those via GDI/GDI+ instead of home-bred solutions.
Anyway, you always can go your 2D-array way. Based on the data you have you just create DIB bitmap each time your dataset changes.
Best regards,
Igor
-
March 13th, 2014, 01:22 AM
#6
Re: Using 2D Array - Displaying Bitmap Image with Scrolling
Originally Posted by Igor Vartanov
Whatever. In case you to operate with several graphical representations of anything you want, you better deal with those via GDI/GDI+ instead of home-bred solutions.
Anyway, you always can go your 2D-array way. Based on the data you have you just create DIB bitmap each time your dataset changes.
I am new in visual programming . Just concentrate on the Image processing related topics for my project. I'm not well in visual programming, Although in GDI. I'm referring few concept which i was using in my project. because of the project schedule time.
I'm studying Visual C++ by Google only, reading some Microsoft VC++ pages or any other paragraph, very difficult to understand by me. If i execute any simple examples, it makes me to clear the concept rather than read the theory/ code hint.
Is possible, pls refer any MFC Dialog based example for me?
Regards,
SaraswathiSrinath
-
March 13th, 2014, 02:11 AM
#7
Re: Using 2D Array - Displaying Bitmap Image with Scrolling
Originally Posted by saraswathisrinath
Is possible, pls refer any MFC Dialog based example for me?
I already provided the link in the post#3.
Victor Nijegorodov
-
March 13th, 2014, 03:02 AM
#8
Re: Using 2D Array - Displaying Bitmap Image with Scrolling
Yes Mr.Victor. I started to read. Thanks.
If i have any doubt, i will come back
Regards,
SaraswathiSrinath
-
March 13th, 2014, 04:11 AM
#9
Re: Using 2D Array - Displaying Bitmap Image with Scrolling
Originally Posted by saraswathisrinath
Originally Posted by saraswathisrinath
Is possible, pls refer any MFC Dialog based example for me?
What's wrong with the project you've been starting with? This is exactly an MFC Dialog based sample. The code loads image from resources while you need to load bitmaps from file. In both cases LoadImage is perfectly fine, you just need a little tweak to make it working. So, don't hesitate and go forward.
Originally Posted by saraswathisrinath
I'm not well in visual programming, Although in GDI ... I'm studying Visual C++ by Google only, reading some Microsoft VC++ pages or any other paragraph, very difficult to understand by me.
Well, you either solve this your education issue or not. The way you educate yourself is absolutely up to you, but this forum is for communication on concrete technical issues, and not about teaching anybody. Please come up with some code and related issues, and people here will be glad to help you.
Best regards,
Igor
-
March 13th, 2014, 06:21 AM
#10
Re: Using 2D Array - Displaying Bitmap Image with Scrolling
Originally Posted by Igor Vartanov
but this forum is for communication on concrete technical issues, and not about teaching anybody. Please come up with some code and related issues, and people here will be glad to help you.
Displaying Bitmap Images with Scrolling this example teach me how to load a bitmap in to the dialog box during run-time?
I have a 2D array. In that example they define a bitmap (m_hBmpNew). I don't know, how to replace my 2D array instead of bitmap file name.
Code:
m_hBmpNew = (HBITMAP) LoadImage(
AfxGetInstanceHandle(), // handle to instance
filename, // name or identifier of the image,
// say, "C:\\NewFolder\\1.bmp"
IMAGE_BITMAP, // image types
0, // desired width
0, // desired height
LR_LOADFROMFILE);
Regards,
SaraswathiSrinath
-
March 13th, 2014, 06:34 AM
#11
Re: Using 2D Array - Displaying Bitmap Image with Scrolling
Originally Posted by saraswathisrinath
Displaying Bitmap Images with Scrolling this example teach me how to load a bitmap in to the dialog box during run-time?
I have a 2D array. In that example they define a bitmap (m_hBmpNew). I don't know, how to replace my 2D array instead of bitmap file name.
At the first step get rid of your 2D array and use .bmp file instead. Try to understand how this code works.
At the next step you can then try to work with the 2D array as Igor mentioned in the post#5.
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|