Weird Image Appearence for TBitBtn in VCL-Formular - c++

I'm currently helping a friend out who has to code Pacman in C++.
The school is using Embarcadero (not Visual Studio) and so I have to create the GUI using the VCL-Formulars. When I tried to create the Main-Menu and put a BMP/Picture onto the Buttons for a better appearance - the BMP got progressed and appeared very weird. I also tried using the BMP in different Version (16-Bit/24-Bit/32-Bit) and used multiple programs to save the BMP for my program.
The result looks like this:
On the right you see the original image I load onto the button.
Left you can see the UI-Editor with the "ugly" color appearance.
So my question would be why are the colors not correctly showed and how could I represent the colors and the bitmap correctly.
Thanks for your help


Combine two or more Images in Vector mode on PictureBox (VB NET)

Here, I have made a description so that you can understand what I mean.
in, to show an image we can use PictureBox.
Now, I'd like to combine them with PNG Images format.
I've tried to combine them, but if I put some adjacent PictureBoxes on coordinate, It doesn't looks PNG Format at all. Yet, they such as jpg format They overlap each other so that we can't see them.
So the main problem, I guess how to set picturebox according to png format.
Well, let's look at the picture below:

Visualize OpenCV images in VS2010 debugger

For VS2012, the excellent Image Watch extension is available, which allows you to view the actual picture of a cv::Mat during debugging.
But, unfortunately, it requires VS2012. Is there a way to visualize a cv::Mat in VS2010?
I know about, but they just format the data better, they don't display it as a picture (or I couldn't find the option/tab?), like Image Watch does.
So is it impossible to do that in VS2010?
I found an extension that does just this. It's called NativeViewer. Just follow their quick start guide.
It allows you to view cv::Mat variables:
Note: You need to press Ctrl BEFORE hovering above the cv::Mat variable, not after you have hovered. This burned me, and I spent 1 hour wondering why it wasn't working, I really wish they had put a warning with bold and uppercase letters about that.

OpenCV - view pixel values like Matlab on MouseOver

I have been looking around in vain to find a utility in OpenCV that works like the image viewer of Matlab, not fully functional as matlab, but atleast shows pixel values with zoom in/out functionality.
Any guidance/directions/links much appreciated
Actually the functionality you want is already available, if you build opencv using qt.
See here for an example image, and here for details on how to build opencv with qt.
There is an extension to MS-Visual studio called Image Watch. It enables you to see the images in debug window during runtime.
You can see the image as well as the values by moving the mouse over the pixels.

How to create PNG images with Visual Studio C++ 2010?

IN: Visual Studio 2010 Ultimate, Windows 7
OUT: Some small ish PNG images that I will use as custom markers in Google Maps.
Language: C++ (or, if I really have to, C#)
Extra: I need to be able to plot the alpha channel (the transparency). I used PNGwriter library on a Linux machine and that didn't offer this feature.
Extra 2: The .exe will run on a server each time a new custom marker is needed. (Markers have different colors and shapes)
Edit: 1. I want to create a new image. 2. I need a library which I can't seem to find via Google yet.
Do you mean you want to convert from one file format to PNG using C++? Or that you want to render to an image and save the resulting image out as a PNG?
Either way, maybe you should take a look at FreeImage which is an open source image parsing/writing library that supports many formats, including PNG.
I created a kluge to do this. I used a common routine for getting the color (GetColor(red,green,blue,transparency)). I printed in two passes. The first pass would print to a 256 gray scale image. GetColor() would return the transparency as a shade of gray. The second pass would print to a 24-bit color image. GetColor would return the RGB color. After the two passes I merged the two bitmaps with the grayscale becoming the alpha channel for the PNG file.
C++ does not have any facilities built in for editing images. You'd need to find a library.
You could always use .NET.
I would suggest the built in System.Drawing namespace, which is available in both flavors - C++ and C#. Assuming you aren't against using Visual C++ Express, you can always take it from there.
Here's a link to the "official" documentation: System.Drawing Namespace
Within which is the System.Drawing.Graphics namespace, which is possibly what you would want to use.
AND here's a link to a nice little tutorial that will teach you how to import an image and draw on it (or possibly even draw it onto a bitmap): The Wonders of System.Drawing.Graphics
Boost.GIL can work with PNG.

How to show Iplmage format on the GUI of C++ instead of showing it in another windows?

I'm trying to display the output image onto the C++ interface instead of creating another window to display the image.
For example: cvNameWindow("Window A",0);
cvShowImage("Window A", imgA);
This will create an window and display the imgA on it.
My question is that can i display my imgA onto my C++ interface together with all my other button and textbox.
I'm using Borland C++ Builder 6 and OpenCV.
For one thing, since it's open source, you can have a look at the cvShowImage implementation for Windows here.
My C++ Builder memories are a bit fuzzy but I guess you can skip all the CvWindow calls and use any control's (a PaintBox?) GetDeviceContext() to its the DC and GetClientRect() to get its size.
Hope this helps.
You will need to convert the IplImage to a Graphics::TBitmap with this. Then you can draw it as here.