Pixel manipulation in Bitmap image using MFC - windows

hi i created a dialogbox using MFC dialog..
using below url i displayed a bitmap picture in a dialog box.
http://www.functionx.com/visualc/applications/displaybitmap.htm
i have not write any code for that.i just added the bitmap Picture into import picture dialog box and used picture control and followed the tutorial...
when i run my application it displays image...
now i would like to know is it possible to do pixel manipulation using this image...
why i ask this means i have not write any code for the display of image...
pls clarify me in this regard....
Thanks a bunch

GetDIBits() and consorts is what you're after. Quite frankly, win32 image and DC manipulation is a rather advanced subject and you'll need to put in a lot more work than following a tutorial for getting it right. Start by reading the msdn docs for GetDIBits() and related functions, then read the relevant sections in the Petzold, then read all articles that mention GetDIBits() on codeproject.com. That should teach you enough to do low level bitmap manipulation.
Alternatively, phrase your question better (i.e., explain your problem and what you want to achieve) and maybe there's a quick and dirty fix that someone can offer you.

There is I recall a Win32 API to load and decode bitmaps.
Once you have the bitmap in memory an as RGB buffer, you can modify it. You will then need to emit the modified buffer as a new bitmap, which again the API will do for you.
Be aware of course that having a bitmap in memory where you then wish for example to increase the dimensions of the image will require appropriate buffer manipulation - there is no Win32 API for generalized bitmap editing.

Related

Is there a way to manually scroll a large image in PowerPoint?

Preview of what I'm looking for
Hello, I'm looking for a way to manually scroll a large image in PowerPoint. In the image there's an example of what I'm looking for. I want to have a preview of the image that I can scroll through and the actual image that moves accordingly to the scrollbar.
Thanks!
I assume you want this in SlideShowView? For sure this can be achieved only by scripting. Essentially you would have to program buttons for up and down movements and use vba do apply this to the image. The preview is a bit more complicated since you would have to do some math too to achieve the conversion in the size differences. All in all a job for a programmer. Are you looking for programming support here?

How can I Make a Steganographic Image

I want to make a steganographic image using some very simple software. I want to demonstrate the principle by opening up a bitmap image file in an editor that will let me see the binary that encodes the colours of individual pixels. I want to change the last couple of bits for some pixels to hide my secret binary message, then re-save the image. I have seen that there are a few applications available that can create steganographic images, some of which are free, but they seem to hide what is really going on. I want to see and edit the 'raw' binary for myself. I hoped something like Notepad++ or Cyberchef would let me do this, but apparently not. Can you suggest something I can use please?

I want to batch extract gps data (exif) then convert to address and save that text to a jpg

I have 1500 pictures that need the address where they were taken to be shown in the corner of the picture. I have the pictures geo-tagged.
I need help extracting the GPS data and converting that to an address.
Then getting that address and saving it into the picture in the bottom right corner. Can anyone help or point me in the right direction please?
You're going to need two things. First you need an application that will extract the EXIF data that you are interested in. You should be able to write this yourself as it is fairly simple to do. You will need the JPEG standard and just need enough of it to identify the markers; specifically the APPn markers. You are also going to need the EXIF and (possibly the) TIFF standards to figure out how to extract the data you need form the EXIF APPn marker.
Writing the information to the corner of the image is the tough part. There are probably command line applications that will allow you to do that already. If worst comes to worst, there are various language API's that will allow you to read a JPEG stream into a buffer; draw text to the buffer; then write the buffer back to a JPEG stream.
You will most likely need to use a programming language for this; I think Python would be suitable as it's easy to get started and has libraries needed for your task.
For example, in order to extract the location (coordinates) from the JPEG files you can use pyexiv2.
To transform those coordinates to addresses you need to use a geocoding service such as Google's Geocoding API - you can use their Python library directly or code your own using something like requests.
Now that you have the address data you can overlay that data onto images using Python's pillow library.
If you're looking for some code to get started let me shamelessly plug my own project called photomap; you can find code to read GPS information from images here: https://github.com/iticus/photomap/blob/master/handlers.py#L170

Load image from memory into VB6 PictureBox

I'm not a VB6 developer so excuse me if I'm not making any sense.
If I have a VARIANT array of bytes containing an RGB array of image data, is it possible to get that data to be displayed in a PictureBox? The PictureBox documentation suggests that the only acceptable sources are files.
Additionally, the image size and other image information is known.
The PictureBox documentation lies. But unfortunately, it’s not pretty to create an IPictureDisp in memory. The following link may help you – unfortunately, it’s in German:
How to create a picture from data in memory
There may be a better (i.e. faster) method, but you should look in to the PSet method of a picture box control.
PSet method of picture box control

Waterfall display

I need help in creating a waterfall display of my image data stored in a buffer. The stream of image data needs to be displayed scrolling down the screen as its being acquired from the camera.
I am using visual studio c++ windows forms.
Can someone please help me to figure out how to achieve this display?
Thanks in advance
I think the info you provide is to minimal to suggest anything worthwhile.
For making custom graphical effects, the usual suggested route is to make a DIB bitmap, which gives you access to the raw bytes. Alter the bytes anyway you see fit (adding the stream of raw image bytes from your camera) and then blit it to the windows HDC in a timely fashion.

Resources