简体   繁体   中英

Png to Base64 turns image background black

We have a very old application that converts HTML page to Word file (.doc). Recently we added an image in the page and after saving as .doc , image background turns black. Image was a .png one and converted to base64 format.

The code is something like below. Can anyone explain what may be the reason and any steps to solve either via code or by MSWORD settings?

 <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...UVORK5CYII=" width="250" height ="100" />

Is this image missing? Perhaps the blank is indicative of a missing image/'texture'. You could upload the image to discord and copy the link so that the image can always be found online.

Perhaps these forums have the answer you're looking for? https://answers.microsoft.com/en-us/msoffice/forum/all/saving-images-in-html-documents/948a796d-36a9-4307-af81-3414d89951ba

https://www.techrepublic.com/pictures/save-images-in-microsoft-word-documents-as-separate-files/

What about?... "This most commonly occurs when an image has an embedded CMYK Color Profile & is inserted into a document saved in the .doc file type. The same JPEG saved either in RGB Color Mode or saved without an embedded CMYK profile probably would work fine. PNG supports only RGB color mode. "

We need more details. Thank you. :))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM