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
0
votes
1 answer

I'm trying to load a 32 bit image with the Windows Imaging Component, flip it and then save it back again in the same file

I have successfully loaded the image in Windows Imaging component as below But I am stuck at last step, How do I save the image that is now available in pWICBitmap variable. Also I want to know if, is below a good way to flip Bitmap image? Here…
Rajesh Rane
  • 47
  • 2
  • 9
0
votes
1 answer

CoCreateInstance dont work

I tried to make a Bitmap with direct2d. The problem is the function CoCreateInstance(...) it wont work HRESULT Renderer::InitImagingFactory() { if (FAILED(CoInitializeEx(NULL, COINIT_MULTITHREADED))) return E_FAIL; if…
A. Boz
  • 132
  • 1
  • 8
0
votes
1 answer

TransformedBitmap changing pixel format and gamma?

I have encountered a strange behavior of TransformedBitmap. A 16-bit grayscale TIFF image (PixelFormats.Gray16) loads just fine into a BitmapSource, but when the image is scaled using TransformedBitmap containing scaling transform, WIC changes pixel…
Libor
  • 3,285
  • 1
  • 33
  • 41
0
votes
0 answers

Create WIC bitmap from managed array

With GDI+ I can create a Bitmap backed by my own array like this: // bitmap is int[] GCHandle imageHandle = GCHandle.Alloc(bitmap, GCHandleType.Pinned); IntPtr imageDataPtr = Marshal.UnsafeAddrOfPinnedArrayElement(bitmap, 0); Bitmap image = new…
Surubelnita
  • 107
  • 9
0
votes
1 answer

SharpDX: BitmapFrameEncode.WriteSource takes much longer with some images

I had replaced some dodgy GDI+ routines with SharpDX to load a bitonal TIFF image from a Stream, render text on it, then save it back to TIFF format as a Stream. But the SharpDX code is taking much longer to do the same thing, and I'm wondering if I…
Benji L.
  • 197
  • 11
0
votes
1 answer

Windows Imaging Component - How to get an encoder from an HBITMAP?

I have an HBITMAP provided by a 3rd party library, and need to write it rescaled on disk as a JPEG. I have never used WIC, so I've been following this tutorial: https://msdn.microsoft.com/en-us/library/windows/desktop/ff973956.aspx I have created a…
Guest
  • 13
  • 4
0
votes
1 answer

WIC increases the size of TIFF image

Scenario: Load a TIFF image and extract the frames of tiff image and save it locally. Combine the extracted frames to the output TIFF image. When i try to combine the frames, the size of the output tiff image is increasing drastically. For example…
IPS
  • 81
  • 1
  • 12
0
votes
2 answers

How to convert YCbCr planar format to packed format by WIC for UWP?

my source is from FFmpeg, it's a YCbCr planar format (YUV420P, I420), for some reasons, I need to convert it to YCbCr packed format (NV12), and it have to do it by WIC YCbCr APIs, how to I do ?
PatrickSCLin
  • 1,419
  • 3
  • 17
  • 45
0
votes
1 answer

threads returns errors (sometimes) in WIC

I made an encoder using WIC. then i tryied to use thread for the most time consuming part. which is /*Encodes a bitmap source*/ hr = piBitmapFrame->WriteSource( piBitmapSrc, /*bitmap source*/ rc /*area which need to be…
mhs
  • 1,012
  • 2
  • 14
  • 35
0
votes
2 answers

Create fresh new BitmapMetadata for a newly created JpegXR encoded image in C#

I am trying to create (encode) a Bitmap into a file - the format shall be JpegXR and I want metadata to be associated with it. WIC and it's counterparts in C# (.Net) do a great job but I fail to creating any kind of metadata object. This is what I'm…
Robetto
  • 739
  • 7
  • 20
0
votes
1 answer

IWICBitmapDecoder::Initialize() failing

I have a byte stream pBitmap, And i need to create a decoder from it. so I tried as follows IWICStream *piStream = NULL; IWICBitmapDecoder *piDecoder = NULL; //piFactory is my IWICImagingFactory hr =…
wicky
  • 384
  • 3
  • 17
0
votes
0 answers

How do I construct a C# .NET WIC WriteableBitmap at is maximum resolution?

According to this -> https://social.msdn.microsoft.com/Forums/vstudio/en-US/58710bdd-4832-4531-a50a-b83a7e733cdd/maximum-size-of-a-writeablebitmap-systemwindowsmediaimagingwritablebitmap?forum=wpf The maximum height and width of an image is 2^16…
Seong Yup Yoo
  • 335
  • 1
  • 3
  • 11
0
votes
0 answers

IWICBitmapLock::GetStride method always returns the same value

I have this code, which executes several times during runtime: // Restore the bitmap from the copy IWICBitmapLock *pLock = NULL; UINT cbStride = 0; hr = m_pWICBitmapCopy->GetSize(&uiWidth,&uiHeight); WICRect rcLock = { 0, 0, uiWidth, uiHeight…
Craftsmann
  • 95
  • 1
  • 10
0
votes
1 answer

IWICBitmapScaler doesn't work for 96bppRGBFloat format?

I encountered a probem when I was using the WIC lib. And I found that I can't scale R32G32B32 images using IWICBitmapScaler... The code example shows below: { IWICImagingFactory* m_pWICFactory; HRESULT hr = S_OK; // Initialize COM hr…
Guoch
  • 5
  • 3
0
votes
1 answer

Convert EMF to BMP (Metafile to Bitmap) using Windows Imaging Component

I have an .emf file that I want to convert to a bitmap in legacy VC++ 6.0 code. I've been looking through the WIC documentation and I'm surprised I haven't seen a way to do this. Am I missing something? If WIC ends up not supporting this, is there a…
Mr. Awesome
  • 575
  • 1
  • 6
  • 19