227{
236
239 {
242
244 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &framedecode);
245
247 {
248 hr = IWICBitmapFrameDecode_GetSize(framedecode, &
result->width, &
result->height);
249
251 {
254 }
255
257 hr = IWICBitmapFrameDecode_GetPixelFormat(framedecode, &
pixelformat);
258
261 {
263 IWICBitmapSource_AddRef(
source);
265 }
266 else
267 {
271 }
272
274 {
281
282 IWICBitmapSource_Release(
source);
283 }
284
286 hr = IWICBitmapFrameDecode_GetResolution(framedecode, &
result->dpiX, &
result->dpiY);
287
288 IWICBitmapFrameDecode_Release(framedecode);
289 }
290
292 {
293
294 int nonzero_alpha = 0;
296
298 {
300 {
301 nonzero_alpha = 1;
302 break;
303 }
304 }
305
306 if (!nonzero_alpha)
307 {
310
312 }
313 }
314
316 {
317
318 UINT andBytesPerRow = (
result->width+31)/32*4;
319 UINT andBytes = andBytesPerRow *
result->height;
329 int topdown;
330
332
334 {
336
338
340 {
343 }
344
346 hr = IStream_Read(
stream, tempdata, andBytes, &bytesread);
347
349 {
350 if (topdown)
351 {
352 andStride = andBytesPerRow;
353 andRow = tempdata;
354 }
355 else
356 {
357 andStride = -andBytesPerRow;
358 andRow = tempdata + (
result->height-1)*andBytesPerRow;
359 }
360
363 BYTE *andByte=andRow;
366 BYTE andVal=*andByte++;
375 }
376 andRow += andStride;
377 bitsRow += bitsStride;
378 }
379 }
380
382 }
383 }
384
385 IWICBitmapDecoder_Release(decoder);
386 }
387
389}
void BmpDecoder_GetWICDecoder(BmpDecoder *This, IWICBitmapDecoder **ppDecoder)
void BmpDecoder_FindIconMask(BmpDecoder *This, ULONG *mask_offset, int *topdown)
HRESULT IcoDibDecoder_CreateInstance(BmpDecoder **ppDecoder)
HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
#define IsEqualGUID(rguid1, rguid2)
@ WICDecodeMetadataCacheOnLoad