225{
234
237 {
240
242 hr = IWICBitmapDecoder_GetFrame(
decoder, 0, &framedecode);
243
245 {
246 hr = IWICBitmapFrameDecode_GetSize(framedecode, &
result->width, &
result->height);
247
249 {
252 }
253
255 hr = IWICBitmapFrameDecode_GetPixelFormat(framedecode, &
pixelformat);
256
259 {
261 IWICBitmapSource_AddRef(
source);
263 }
264 else
265 {
269 }
270
272 {
279
280 IWICBitmapSource_Release(
source);
281 }
282
284 hr = IWICBitmapFrameDecode_GetResolution(framedecode, &
result->dpiX, &
result->dpiY);
285
286 IWICBitmapFrameDecode_Release(framedecode);
287 }
288
290 {
291
292 int nonzero_alpha = 0;
294
296 {
298 {
299 nonzero_alpha = 1;
300 break;
301 }
302 }
303
304 if (!nonzero_alpha)
305 {
308
310 }
311 }
312
314 {
315
316 UINT andBytesPerRow = (
result->width+31)/32*4;
317 UINT andBytes = andBytesPerRow *
result->height;
327 int topdown;
328
330
332 {
334
336
338 {
339 tempdata =
malloc(andBytes);
341 }
342
344 hr = IStream_Read(
stream, tempdata, andBytes, &bytesread);
345
347 {
348 if (topdown)
349 {
350 andStride = andBytesPerRow;
351 andRow = tempdata;
352 }
353 else
354 {
355 andStride = -andBytesPerRow;
356 andRow = tempdata + (
result->height-1)*andBytesPerRow;
357 }
358
361 BYTE *andByte=andRow;
364 BYTE andVal=*andByte++;
373 }
374 andRow += andStride;
375 bitsRow += bitsStride;
376 }
377 }
378
380 }
381 }
382
383 IWICBitmapDecoder_Release(
decoder);
384 }
385
387}
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