Modify the createImage method of the StampAnnotation class in src/core/annotation.js
The existing createImage method always fills the background with white before saving the image data as JPEG, even if the image data includes an alpha channel. This results in all image data, including those with alpha channels, being forcibly converted to JPEG.
The PDF format manages a separate mask stream for the alpha channel. Therefore, image data that includes an alpha channel has been modified to include DecodeParms and use the FlateDecode filter instead of DCTDecode
Modify the createImage method of the StampAnnotation class in src/core/annotation.js
The existing createImage method always fills the background with white before saving the image data as JPEG, even if the image data includes an alpha channel. This results in all image data, including those with alpha channels, being forcibly converted to JPEG.
The PDF format manages a separate mask stream for the alpha channel. Therefore, image data that includes an alpha channel has been modified to include DecodeParms and use the FlateDecode filter instead of DCTDecode