How do I convert exported images to png?

Hello,

I’m using scrivener to create a document which I then export to markdown from which I convert to latex (using scholdoc) and then PDF.

To add images to my document, I past them into the document and then drag them into the research folder and link into them there (using <$img:image_name>). When I compile the document into markdown the images are exported as tiff however which is not supported by latex. Is there a way to specify that the images should be converted to png on compile?

Some more information:

When exporting to latex the images are again exported as tiff which isn’t supported.

It tried inserting the images directly into the Research folder, same results. Only solution is instead of copy pasting them, to save them to disk and then drag them in (very cumbersome).

For some reason on some crashes (on occasion I crash my mac when disconnecting the display when it’s off), all the images are converted to png and then everything is fine until I add a new image, so there seems to be some underlying way to do this (I’m happing with having all the images behind the scene as png with no conversion on compile). I did not find any deterministic way to do it though.

There is an option to convert images to png on export to word, so again, there seems to be some underlying mechanism that I have not discovered to do this.

Thank you

I found a (difficult) work around, although I do hope that there is a better way to do this.

If I go to the Files/Docs folder, convert all images to png (using convert from ImageMagick) and then open the .scrivx file in the top directory and replace all references to tiff with png, things work.

I do wonder how that happened by itself before, there must be some trigger somewhere that I didn’t find to induce this. Not sure though if it’s a bug (which I would be happy to exploit) or a feature.

Hi

If no one else comes along with a direct solution for you, I would try using linked inline images—see section 15.5.3 of the user manual—which should preserve the format of the original image as you need, so long as the stored image is in PNG format.

Worth trying a single image as a test initially to make sure it compiles as you need it to.

Best

Briar Kit

I would like a easy resolution for this as well, surely there must be a way to specify the output format