Questions tagged [wic]

Windows Imaging Component

The Windows Imaging Component (WIC) provides an extensible framework for working with images and image metadata. WIC makes it possible to develop image codecs and get the same platform support as standard image formats. A single, consistent set of interfaces is used for all image processing, regardless of image format, so any application using the WIC gets automatic support for new image formats as soon as the codec is installed. The extensible metadata framework makes it possible for applications to read and write their own proprietary metadata directly to image files, so the metadata never gets lost or separated from the image.

171 questions
1
vote
1 answer

Getting RGB from WIC image c++

I am using WIC to load in an image and then I want to be able to get the RGB values of each pixel. I have got as far as using getDataPointer() to create a byte buffer (which I cast to a COLORREF array) but after this things get strange. I have a…
poncho
  • 1,100
  • 2
  • 15
  • 38
1
vote
1 answer

Using LoadImage for resources win32

I have a program that Im using OpenFileName and GetOpenFileName to get a file and using Windows Imaging Component to convert it to a DIBSection then using BitBlt to draw it to the window. I want to do the same with my resource files so I use…
1
vote
2 answers

Draw WICBitmap to window?

I have a WICBitmap that contains an image in my MFC program. Is there any way to draw this bitmap onto a device context? void DrawBitmap(IWICBitmapSource source, HDC targetDC, int X, int Y, int cx, int cy) { //source: The Bitmap to draw …
xcdemon05
  • 1,372
  • 5
  • 25
  • 49
1
vote
0 answers

How do I use the WIC API to read/write custom EXIF data?

I have gone through the documentation at: http://msdn.microsoft.com/en-us/library/windows/desktop/ee719799(v=vs.85).aspx As context, I am trying to encode in the JPEG-XR format and I want to emulate GDI+'s SetPropertyItem, GetPropertyItem…
Sau
  • 326
  • 2
  • 15
1
vote
2 answers

Windows 7: Saving as TIFF CCITT Group4 changed?

My program, that converts a multi page TIFF to PDF is not longer working under Windows 7. The program contains code that walks through the pages of the TIFF, converts each page as TIFF with CCITT Group4 compression and inserts the bitmap data in…
Corne
  • 646
  • 1
  • 6
  • 19
0
votes
1 answer

Save normal map as 16bit texture with WIC

I have an art pipeline, which includes following steps: Normal map is generated. I want to save only X and Y components as unsigned bytes. Z is omitted because it is reconstructed in pixel shader. Normal map is saved to an intermediate image file…
iseeall
  • 3,381
  • 9
  • 34
  • 43
0
votes
1 answer

WINCODEC_ERR_WIN32ERROR 0x88982F94 when calling IWICComponentFactory.CreateBitmapFromMemory

I'm getting the following error when calling IWICComponentFactory.CreateBitmapFromMemory and passing it a pointer to Scan0 of a 32bppArgb GDI+ bitmap WINCODEC_ERR_WIN32ERROR 0x88982F94 Windows Codecs received an error from the Win32…
Lilith River
  • 16,204
  • 2
  • 44
  • 76
0
votes
1 answer

WICBitmapSource.CopyPixels to GDI Bitmap Scan0

I've modified the C# IWICBitmapSource.CopyPixels interface to allow both array marshaling and passing a pointer: void CopyPixels( WICRect prc, uint cbStride, uint cbBufferSize, [Out] …
Lilith River
  • 16,204
  • 2
  • 44
  • 76
0
votes
1 answer

How to initialize a data type that doesn't have a default trait (such as IWICBitmapFrameEncode)?

I'm using the windows-rs, the official crate for Windows API. Usually I have no problem with data object initialization, I can use several way to do it, for example: let bitmap = BITMAP::default(); //initialize a BITMAP object or if it's a…
abcjeff
  • 5
  • 4
0
votes
0 answers

How to initialize IWICBitmapDecoder with Windows Imaging Component API

Actually I belive that this problem is easy to solve. It only needs a minor correction. This is the first time that I use Windows Imaging Component (WIC). I am trying to display a PNG picture in my window using Win32 or the Windows API as Microsoft…
0
votes
0 answers

Converting WIC.Bitmap to System.Drawing.Bitmap with the highest resolution possible

We are rendering some rectangles to a SharpDx 2D panel, that all works fine. The clients have the ability to share the selected data to an image (to be able to post it somewhere). This process is done by drawing the elements on to a WIC.Bitmap and…
Maza
  • 1
  • 4
0
votes
0 answers

Reading EXR file

I'm trying to create a IWICBitmap from an EXR file (error checks removed). #pragma pack(push,1) struct fl { float r, g, b, a; }; #pragma pack(pop) HRESULT Open(const char* f,IWICBitmap** d) { …
Michael Chourdakis
  • 10,345
  • 3
  • 42
  • 78
0
votes
2 answers

Maximum float value in 10-bit image in WIC

I'm trying to convert a HDR image float array I load to a 10-bit DWORD with WIC. The type of the loading file is GUID_WICPixelFormat128bppPRGBAFloat and I got an array of 4 floats per color. When I try to convert these to 10 bit as follows: struct…
Michael Chourdakis
  • 10,345
  • 3
  • 42
  • 78
0
votes
0 answers

How can I save a group of Direct2D bitmaps to a dynamic image file?

recently, I'm disturbed by saving bitmap to dynamic image file. I want to turn a group of bitmaps into a dynamic image file, but the function IWICBitmapFrameEncode::WriteSource only cover the previous frame while writing a new frame to file, and it…
DGAF
  • 71
  • 7
0
votes
1 answer

BIts Per Sample / Pixel libtiff vs WIC

TIFF *TiffImage; uint16 photo, bps, spp, fillorder; uint32 width,height; unsigned long stripSize; unsigned long imageOffset, result; int stripMax, stripCount; unsigned char *buffer, tempbyte; unsigned short *buffer16; unsigned int…
Gilad
  • 6,437
  • 14
  • 61
  • 119