evilz / vscode-reveal

Revealjs vsCode extension
https://marketplace.visualstudio.com/items?itemName=evilz.vscode-reveal
MIT License
454 stars 146 forks source link

html-export destroying binary files #1029

Open rolszewo opened 2 years ago

rolszewo commented 2 years ago

using:

When i export to html all binary files are destroyed. E.g. i have a background picture (png) or an embedded picture (jpg) or webfonts (woff2) All have different sizes in export and are not anymore files of the same filetype like before.

# -------------------------------------
# source files

-rw-r--r-- 1 domänen-benutzer domänen-benutzer 125478 Jul 27 11:48 bashcmd.jpg
-rw-r--r-- 1 domänen-benutzer domänen-benutzer  91819 Jul 26 16:39 background-grid.png
-rw-r--r-- 1 domänen-benutzer domänen-benutzer  23940 Jul 26 16:38 fa-regular-400.woff2
-rw-r--r-- 1 domänen-benutzer domänen-benutzer 154228 Jul 26 16:38 fa-solid-900.woff2

source/background-grid.png:  PNG image data, 1926 x 1083, 8-bit/color RGB, non-interlaced
source/fa-regular-400.woff2: Web Open Font Format (Version 2), TrueType, length 23940, version 769.768
source/fa-solid-900.woff2:   Web Open Font Format (Version 2), TrueType, length 154228, version 769.768
images/bashcmd.jpg:          JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 1157x863, components 3

and here

# -------------------------------------
# files in html export

-rw-r--r-- 1 domänen-benutzer domänen-benutzer 216894 Aug  4 09:19 export/images/bashcmd.jpg
-rw-r--r-- 1 domänen-benutzer domänen-benutzer  26919 Aug  4 09:19 export/libs/reveal.js/4.3.1/plugin/menu/font-awesome/webfonts/fa-regular-400.woff2
-rw-r--r-- 1 domänen-benutzer domänen-benutzer 107917 Aug  4 09:19 export/libs/reveal.js/4.3.1/plugin/menu/font-awesome/webfonts/fa-solid-900.woff2
-rw-r--r-- 1 domänen-benutzer domänen-benutzer 167251 Aug  4 09:19 export/themes/ssc/img/background-grid.png

export/libs/reveal.js/4.3.1/plugin/menu/font-awesome/webfonts/fa-solid-900.woff2:   Web Open Font Format (Version 2), TrueType, length 61375, version 49085.25088
export/libs/reveal.js/4.3.1/plugin/menu/font-awesome/webfonts/fa-regular-400.woff2: Web Open Font Format (Version 2), TrueType, length 14952, version 14871.1
export/themes/ssc/img/background-grid.png:                                          data
export/images/bashcmd.jpg:                                                          data

All file sizes of this binary files are different. In woff2 the file size is written to the header (length 23940) and this matches for the source filesize on disk, but not for the exported filesize.

What is going wrong with html-export? What can i do?

kamua commented 2 years ago

I have the same problem. The files logo.png and export\libs\reveal.js\4.3.1\plugin\menu\font-awesome\webfonts\fa-regular-400.woff2, export\libs\reveal.js\4.3.1\plugin\ menu \font-awesome\webfonts\fa-solid-900.woff2 are corrupted.

image

These files can be replaced manually with files from the folder c:\Users\<user name>\.vscode\extensions\evilz.vscode-reveal-4.3.3.

missflash commented 1 year ago

I have the same problem. The files logo.png and export\libs\reveal.js\4.3.1\plugin\menu\font-awesome\webfonts\fa-regular-400.woff2, export\libs\reveal.js\4.3.1\plugin\ menu \font-awesome\webfonts\fa-solid-900.woff2 are corrupted.

image

These files can be replaced manually with files from the folder c:\Users\<user name>\.vscode\extensions\evilz.vscode-reveal-4.3.3.

Thanks for your reply!

natillet commented 6 months ago

I'm also experiencing this issue. My images files get corrupted, expanding their size and making them unable to be rendered, and the icons from the extension show up as boxes (as in previous comments on this thread).

vscode-reveal: v4.3.3

armabon commented 3 weeks ago

Hi 🖖 This small patch seems to fix the issue about binary file corruption