Is it possible to edit an image we put in our scrivener project ?

cv
cvanhenten
Posts: 1
Joined: Thu Nov 23, 2017 10:37 am
Platform: Mac + iOS

Tue Nov 28, 2017 10:57 am Post

I imported a book I wrote under word into scrivener to make a new augmented edition.
This book contains pictures (made with fireworks and illustrator)
Before I had the word document and a folder with all the pictures.
I thought I could put everything inside a scrivener project even images that should be re-edited.
I added images in my scrivener project but I'd like to edit them before inserting them in my book.
Can I do something like "open with..(name of app) ? or
Can I do something like "open in finder" to then open it with a specific App?

To be concrete: I added some ai files (illustrator pictures) from a previous edition of my book and I'd like to update the drawings before inserting it in the new version I 'm writing with scrivener

Online
User avatar
nontroppo
Posts: 748
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Tue Nov 28, 2017 11:30 am Post

I use Adobe Illustrator files for all my figures, and I store them in the Binder. They use a quicklook view in the editor and on the Footer View there is an icon to "Open in External Editor..." (long press to choose the app)

Screen Shot 2017-11-28 at 19.28.06.png
Screen Shot 2017-11-28 at 19.28.06.png (7.59 KiB) Viewed 262 times



In Scrivener 3 you can also ⌘-click the .AI Binder item to get a "Reveal in Finder" context menu item...

User avatar
Bridey
Posts: 181
Joined: Wed Nov 22, 2017 2:24 pm
Platform: Mac

Tue Nov 28, 2017 11:37 am Post

You might find it best to store the images in a folder outside of Scrivener and reference them using image placeholder tags (see sections 15.6.5 and 15.6.6 of the manual).

This means that the images can easily—and repeatedly, if necessary—be edited in external programs or replaced.

For example, completely changing an image or using different sets of images at different resolutions for different outputs by using the same file names and swapping images in and out of the external folder as needed during different compiles.

The basic syntax is:
<$img:Image_Name;w=width;h=height>

For example:
<$img:~/Dropbox/christmas/santa_claus.png;w=400;h=300>

Width and height are given in points. You can also just set one value (or no value at all):
<$img:~/Dropbox/christmas/santa_claus.png;w=400>

User avatar
AmberV
Posts: 20601
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Tue Nov 28, 2017 2:57 pm Post

There are a few new capabilities that enhance linked images (as opposed to placeholder links referred to above) in the editor as well. There are two approaches here:
  1. Insert an image from the disk with Insert/Image Linked to File...
  2. Insert an image from the binder with the Insert/Image Linked to Document, or if you anticipate doing this a lot, I’d highly recommend setting the Link to images dragged from binder into editor setting, in the Behaviors: Dragging & Dropping preference pane.
Now with either type of linked image you can right-click on the image in the editor and select “Open in External Editor”. Easy.

The thumbnail in the editor won’t update immediately. If you really need that to happen:

  • For a binder linked file: right-click and “Reveal in Binder”, delete the old image link and then drag it back in from the binder highlighted image.
  • For disk linked files it is easier: double-click the image, click the Change... button and then click “OK” (the previous image will be preselected). I have a Keyboard Maestro macro for that one. I just hover my mouse over the image I want to update and punch F5.
It’s worth noting that if you insert image links to binder items, editing those items (as described above) will naturally impact the copies in the editor when you compile. They are one and the same.

For example, completely changing an image or using different sets of images at different resolutions for different outputs by using the same file names and swapping images in and out of the external folder as needed during different compiles.

Placeholder links, beyond whether they are a matter of preference, are I would say the superior option when you want to manipulate which images you use in compile because you don’t have to do that. :)

You could swap folder names around on the disk (and that method works when using linked image thumbnails as described above), but since image placeholder references are text links, you can use Replacements in compile to modify file paths to use high-res/low-res source files based on compile intent, or even adjust the size of images to suit the format. For a simple example, you could create this workflow:
  1. For all projects create a “gfx” folder beside the .scriv project, and inside that have “300dpi” and “150dpi” subfolders.
  2. As you work, you insert placeholders like so: <$img:/path/to/gfx/%%/image_name.jpg>.
    (In fact, if you wanted to get really fancy you could add a project compile Replacement that modifies {{image_name.jpg}} to the almost-full syntax above, and then you can establish the path to all images in one single location in compile settings, and meanwhile type in and look at least code while writing. See Advanced Replacements Usage, pg 566 of the user manual PDF.)
  3. Each compile Format you create that works with this system would then have an entry in its Replacements table to replace “%%” with “300dpi” or “150dpi” as needed.
    (This even works as a second-stage replacement when combined with the above tip. Your project can replace local syntax with full syntax and detailed path information, leaving only the one detail left for the Format to fill in.)
  4. Whether you type in the whole thing in the editor except for the version, or use Replacements to make your life easier while writing—the important thing is that the project establishes the root path for where graphics are stored (as well as the file name of course), keeping formats themselves clean of project-specific information, focussed purely on selecting the resolution (or whatever variant is necessary, like Mac/Win screenshots) itself up the format to insert.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
Bridey
Posts: 181
Joined: Wed Nov 22, 2017 2:24 pm
Platform: Mac

Tue Nov 28, 2017 3:24 pm Post

AmberV wrote:There are a few new capabilities that enhance linked images (as opposed to placeholder links referred to above) in the editor as well...


Lots of good tips.

Two additional things I like about using placeholder links are that they help to keep projects lighter by being text only, and they save the user from having to see the images while writing.

User avatar
AmberV
Posts: 20601
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Tue Nov 28, 2017 3:35 pm Post

Definitely a good point for them. The same is true of images linked to the disk by the way. Although thumbnails of the images will be displayed in the editor, the actual reference itself is a text link not too much more bulky than the <$img...> syntax.

Obviously if you link to binder images the image is in the project. :) It does keep the text editing files trim though, to work that way.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Online
User avatar
nontroppo
Posts: 748
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Tue Nov 28, 2017 3:57 pm Post

I really like having all my figures in the Binder (one ring to rule them all, and in the darkness bind them...), and though I used to use ![caption](binder_name) text document links, I am slowly gravitating towards Binder linked images and a caption style.

BUT lets not get too carried away, the OP asked about Adobe illustrator files, and these cannot be used in the editor at all by Scrivener :P

What I do is I organise my illustrator files as children of the PNG exported by Illustrator, so I can use the corkboard to see my figures, with their source tucked away as a binder child:

Screen Shot 2017-11-28 at 23.43.23_SMALL.png
Screen Shot 2017-11-28 at 23.43.23_SMALL.png (23.96 KiB) Viewed 215 times


To update figures, I edit the Illustrator file within the project binder, then export a PNG to the desktop, and use the totally awesome new command Documents ▶︎ Replace Media File…, to update the PNG which is linked into text documents (all links are preserved). This has been such an improvement in S3 for my needs...

User avatar
Bridey
Posts: 181
Joined: Wed Nov 22, 2017 2:24 pm
Platform: Mac

Tue Nov 28, 2017 4:07 pm Post

Ah, choice. It's what makes each user (feel) omnipotent.

Heart Scrivener.