gdiplus

Fuzzy Top Edge with GDIPlus Resize

I'm using the following code to resize a bitmap using GDI+ in C. I'm getting gray values for the top edge even for images where that area should be white. The problem disappears when the interpolation is nearest neighbor. However, I tried bicubic interpolation with ImageMagick and it seems fine. Any limitations problems I should know of...

Win32: Is there a replacement GDI32.dll that uses hardware acceleration?

Has anyone out there created a version of GDI32.dll that takes advantage of hardware acceleration available on the machine? gdiplus.dll? Starting with Windows Vista, GDI is no longer hardware accelerated. (GDI+ was never hardware accelerated). Without Microsoft fixing GDI (and GDI+) to be able to run well on the computer: native applica...

Delphi 7 and EMF+ files

I have an application that can load various graphical file formats such as bmp, jpg, png, emf, etc... and render them onto the screen for previewing. I am using Delphi 7. I have just been introduced to the EMF+ file format that was created around the time of Windows XP that is created utilizing the GDIPlus.dll. I can open the EMF+ file...

How to implement Chord function using GDIplus?

Here are the GDI functions Chord() provided by MFC: BOOL Chord( int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4 ); BOOL Chord( LPCRECT lpRect, POINT ptStart, POINT ptEnd ); It seems to me that no such method is privided by GDI+ (the Graphics class), so how do I implement my own Chord function (with the exact same proto...

Win32: How to determine if DirectDraw is disabled?

When using CachedBitmaps in GDIPlus, there is graphical corruption if Windows video "Hardware Acceleration" is lowered enough that DirectDraw is disabled: There are six levels of hardware acceleration: Disable all accelerations Disable all but basic accelerations. (Default on server machines) Disable all DirectDraw and Direct3D acce...

what's the difference between GdipBitmapLockBits and CreateDIBSection

GdipBitmapLockBits works on pBitmaps, requires locking ? CreatDIBSection gives you a DIBsection, doesn't require locking ? which method is better for working with raw pixel data ? Here are two implementations for finding the difference between two images using each method. ...

Erasing pixel with .Net GDI+

How can I set the alpha channel of a pixel to zero using .Net GDI+ or API calls? How can I set to transparent a shaped area (for instance, having sort of an"Erasing" brush and using it with FillEllipse() or FillRectangle() methods) ? Thank you. ...

AND two bitmaps in C#

Hi all, I'm trying to AND two bitmaps like this: [DllImport("gdi32.dll")] public static extern int SetROP2(IntPtr hDC, int nDrawMode); const int SRCAND = 0x008800C6; // AND raster op. lock (g.Clip) { IntPtr pDC = g.GetHdc (); SetROP2 (pDC, SRCAND); g.Draw...

FileModeWinding and DrawPath cause odd spikes to appear

I'm using gdiplus to "stroke" a textout. In certain circumstances, we see a "spike" appearing on the top or bottom of the graphic, and I'm not really sure why. We can minimize this by adjusting stroke width and font size, but thats not a good solution. I'm hoping someone can explain the problem to me. And the code sample generating...

GDIplus Scale Bitmap

Hello i'm trying to change scale GDIplus::Bitmap and save in memory scaled BItmap, and i have problem. I try many different sample, and my result is NULL. For Example I try change resolution for image, using SetResolution, also i try convert bitmap from image->graphic and use one of constructors GDIplus::Bitmap scale, but i haven't resu...

Gdiplusshutdown results in exit code 1.

Hi, when my app is exited i see the following in the debugger console. The thread '_threadstartex' (0xd48) has exited with code 0 (0x0). The thread '_threadstartex' (0xf80) has exited with code 0 (0x0). The thread '_threadstartex' (0x190) has exited with code 0 (0x0). The thread '_threadstartex' (0xaa0) has exited with code 0 (0x0). T...

C++ Gdiplus::Font changing font size and family

Look this code Gdiplus::Graphics g(hDC); Gdiplus::Font *f = new Font(L"Times new roman", 16); Gdiplus::SolidBrush b(Gdiplus::Color(255,0,0,0)); g.DrawString(L"Hello", 5, f, &Gdiplus::StringFormat(), &b); // Now i want to change font styles // using f->setSize() or f->setFontFamily(). g.DrawString(L"Hello", 5, f, &Gdiplus::StringForma...