bitmap

Hightlight image within a vertical manager

So i have 3 images in a vertical field manager and each image is clickable and proceeds to the correct url. all that works. the only problem at this time is that when i scroll (up or down), i don't know which image is currently focused. i don't know until the browser opens the corresponding url. so is there any way to get a border or a ...

How to construct simple wxWidgets image display

I wrote a wxPython program that I am translating to wxWidgets. The program has a scrolled window that displays an image. Following Rappin, wxPython In Action (Listing 12.1), I used a StaticBitmap within a panel. While surfing the latest wxWidgets documentation, I found a dire warning that wxStaticBitmap should only be used for very sm...

Is there a good way to convert between BitmapSource and Bitmap?

As far as I can tell the only way to convert from BitmapSource to Bitmap is through unsafe code... Like this (from Lesters WPF blog): myBitmapSource.CopyPixels(bits, stride, 0); unsafe { fixed (byte* pBits = bits) { IntPtr ptr = new IntPtr(pBits); System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap( width,...

How to create Bitmap from (Compressed format) Bitmap Info Header and Scanlines in WPF?

I am using SampleGrabber in DirectShow on windows 7, I noticed that the Code supplied by Microsoft and many other providers dont work because the Bitmap data header reports that bitmap data is compressed, however the new Bitmap(width, height, stride, pixelformat, scanlines) doesnt have any parameters to specify that the buffer has compre...

How can I save/load a 16 bit image in .net x64?

Before, when I was using win32, I used FreeImage in order to load and save bitmaps of bit depth greater than 8 bits. That's every image I work with, since I'm doing medical imaging, and before anyone says anything, yes, me and my customers have spent a lot of money on high-brightness, high-contrast monitors with 11 or 12 bits of dynamic...

How to copy something as a pastable bitmap in flash?

How to copy something as a pastable bitmap in flash? So I have simple mxml project - empty page with a panel on it. I want to be able to select some region on my panel and copy it somehow as bitmap pastable to photoshop, word and other programms. How to do such thing? (libs, articles etc) Edit - It may be not possible in FP10 but in...

Is there a way to display a image in WPF stored in memory ?

What I got is something like a screenshot making application. (managed to serialize, thank god!!!) When a button is clicked a screenshot is taken by accessing a handling classe's method. now the tricky part is that the class has another method for operating with the above said result, in such a manner than when the respective handling me...

Question about bitmap saving in .NET

I have a bitmap object and draw some curves on it by setpixel method. when I save this bitmap as jpg file, the background of my picture is not a white surface. the background is transparent. what is the problem? How can I resolve this problem? ...

How to modify properties of Bitmaps in C++

Bitmap bmp(100,100, PixelFormat32bppARGB); bmp.SetPixel(2,2,Gdiplus::Color::AliceBlue); int x = bmp.GetHeight(); int y = bmp.GetWidth(); Gdiplus::Color* ccc = new Gdiplus::Color; Gdiplus::Color* ccc2 = new Gdiplus::Color; bmp.GetPixel(2,2,ccc); bmp.GetPixel(0,0,ccc2); In the past sample code, the bitmap ...

Does HDC use alpha channel?

Hello. Is there a way I can determine if an HDC uses alpha channel? I read Question 333559 and Question 685684, but their questions are about BITMAP. Apparently, some HDC has alpha channel (though they may not use it. Call this "Type 1") while others do not ("Type 2"). I know this by doing the following: Given a HDC, Create a compatib...

c++ MFC CBitmap , CImage or BITMAP structure , get resolution (DPI)

HEllo , i can not find any way to get horizontal or/and vertical resolution for bitmap. If you know how to get it, please say it me , Thank you! ...

Changing the tint of a bitmap while preserving the overall brightness

I'm trying to write a function that will let me red-shift or blue-shift a bitmap while preserving the overall brightness of the image. Basically, a fully red-shifted bitmap would have the same brightness as the original but be thoroughly red-tinted (i.e. the G and B values would be equal for all pixels). Same for blue-tinting (but with...

How to copy a smaller bitmap into a larger one?

Hi, Hopefully this should be an easy question. I'm trying to copy a series of small bitmaps into a larger one, arranging them side by side without any gaps or overlap in their pixels. For example, if I have 3 square bitmaps, I'd like to copy them into one long and thin rectangle. I know how to do the opposite, namely creating a small bi...

Form not showing after Invalidate()

For some reason, this code does not actually draw my bitmap file... or show the form. namespace GraphicsEngine { public partial class Form1 : Form { Bitmap[] dude = new Bitmap[3]; Bitmap dude0 = new Bitmap(@"C:\Directory.bmp"); Point renderpoint = new Point(1, 1); public Form1() { dude[0] = new Bitmap(@"C:...

Help Saving an bitmap using OutputStream on Android, following the Activities onPause.

In my activite's onCreate i have public void onCreate() { try { FIStream = super.openFileInput("4.png"); MyImagePort.load(FIStream); FIStream.close(); FIStream = null; } catch (FileNotFoundException e) { Log.w("spriter","File not found"); } catch (IOException e) { e....

How to create a Bitmap from an image file in Android

How to load an image file (on SD card) into a Bitmap on Android? ...

ZedGraph - disabling the image edge gradient

How to disable the gradient blurring of the images displayed using ZedGraph? I'm creating a plot where I use a bitmap as a background for other curves: ImageObj img = new ImageObj(someBitmap, coords, CoordType.AxisXYScale, AlignH.Center, AlignV.Center); img.ZOrder = ZOrder.E_BehindCurves; img.IsClippedToChartRect = tr...

Easy way to translate a Bitmap & Png to text AND BACK AGAIN in C#

what is the easiest way to translate a Bitmap & Png to string AND BACK AGAIN. Ive been trying to do some saves through memory streams and such but i cant seem to get it to work! Appearently i wasnt clear, what i want, is to be able to translate a Bitmap class, with an image in it.. into a system string. from there i want to be able to ...

Error android.graphics.Canvas.throwIfRecycled when overlaying bitmaps

Im trying to overlay images on a canvas using the following method: private Bitmap overlay(Bitmap bmp1, Bitmap bmp2) { bmOverlay = Bitmap.createBitmap(70, 70, Bitmap.Config.RGB_565); canvas = new Canvas(bmOverlay); canvas.drawBitmap(bmp1, 0, 0, null); //line 179 canvas.drawBitmap(bmp2, 0, 0, null); return bmOverlay...

How can I display a bitmap/icon on an XP style button

I have a small (6x9) graphic that I want to draw on a CButton. I have managed to get this to work using ::LoadImage and CButton::SetBitmap. The problem is that when I put the bitmap on the button it is no-longer drawn as an 'XP style' button. I.e. it does not have rounded corners. How can I draw a bitmap (or an icon) on a button without...