You could skip the GetEncoderClsid routine and use the CLSID directly.
As you can see the 4th byte is the image type.
This makes it possible to use only 16 bytes of data memory for all image types.
Just fill the 4th byte with 0,1,2,5,6 or 7 ( no need to use the "mime type" string )
.data
CLSID_ImageType db 055h,07Ch,0F4h
ImageType db 6 ; PNG
dd 01A0411D3h,09A730000h,0F81EF32Eh
; encoders
CLSID_BMP TEXTEQU <{0557CF400h,01A04h,011D3h,{09Ah,073h,000h,000h,0F8h,01Eh,0F3h,02Eh}}>
CLSID_JPG TEXTEQU <{0557CF401h,01A04h,011D3h,{09Ah,073h,000h,000h,0F8h,01Eh,0F3h,02Eh}}>
CLSID_GIF TEXTEQU <{0557CF402h,01A04h,011D3h,{09Ah,073h,000h,000h,0F8h,01Eh,0F3h,02Eh}}>
CLSID_TIF TEXTEQU <{0557CF405h,01A04h,011D3h,{09Ah,073h,000h,000h,0F8h,01Eh,0F3h,02Eh}}>
CLSID_PNG TEXTEQU <{0557CF406h,01A04h,011D3h,{09Ah,073h,000h,000h,0F8h,01Eh,0F3h,02Eh}}>
CLSID_ICO TEXTEQU <{0557CF407h,01A04h,011D3h,{09Ah,073h,000h,000h,0F8h,01Eh,0F3h,02Eh}}>