Yes, but a non-bitmap (metafile) cannot have multiple frames.
It actually can have records which represent embedded EMFs.
Really? Well, OK then.
- if (stat == Ok)
- {
memcpy(&new_image->format, &codec->info.FormatID, sizeof(GUID));
free_image_data(image);
if (image->type == ImageTypeBitmap)
*(GpBitmap *)image = *(GpBitmap *)new_image;
else if (image->type == ImageTypeMetafile)
*(GpMetafile *)image = *(GpMetafile *)new_image;
return Ok;
- }
You appear to be leaking new_image.