Image Scaling in Editor and Compile Incorrect after "Replace Media File…"

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

Fri Jan 19, 2018 7:17 am Post

I think this is fairly straight forward. Lets say I import an image of 1269x2371x300DPI into my Binder, then create a binder-linked image dragging this into an editor. Now I decide I need to update this figure and use "Replace Media File…" to replace it with a 1269x1830x300DPI image, which looks fine in the Binder.

In the editor we have a cache issue in that the image doesn't change, but we knew about this for a while, and this is a limitation of the current system and I assumed was only a visual flaw. HOWEVER, the scale image information in the editor is now wrong, and this causes the compiled image to become distorted to fit the old points values in Word / LaTeX etc...

Screen Shot 2018-01-19 at 14.49.26.png
Screen Shot 2018-01-19 at 14.49.26.png (43.52 KiB) Viewed 671 times


We can solve this by shutting and reopening Scrivener I think? Or delete and relink. I think a better option is if we could "Reload" the image (context menu) somehow?

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

Fri Jan 19, 2018 10:45 am Post

This also seems to affects images that were imported at the default 72DPI (thus not scaled). Note here the Points values are incongruent to the pixel values:
Screen Shot 2018-01-19 at 18.38.36_SMALL.png
Screen Shot 2018-01-19 at 18.38.36_SMALL.png (23.34 KiB) Viewed 662 times

User avatar
KB
Site Admin
Posts: 19863
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Fri Jan 19, 2018 3:36 pm Post

Hmm, I'm not actually sure what can be done about this, to be honest, because the editor has no idea about changes to binder images. Either I need to remove the "Replace Media File" feature to avoid this sort of issue, or users will have to be careful to use unscaled images for this...
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

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

Fri Jan 19, 2018 4:07 pm Post

"Replace Media File..." is incredibly useful and more important than the minor problem with scaling, please don't remove it! :shock: I suspect this may be a limitation of textkit, but is there a problem with having a manual "refresh" command that would simply rescan the image dimensions from the binder, you have the details of where the image is right? Wouldn't image delete and relink update the values (i.e. you do it automatically rather than the user doing it manually?

User avatar
KB
Site Admin
Posts: 19863
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Mon Jan 22, 2018 4:40 pm Post

I think that's probably the only solution. I've added "Reload Original Image" to the contextual menu for linked images (whether linked to an external image or a binder image). This simply replaces the Ctrl-clicked image with the original image again, so that it both reloads it and restores it to the original size.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

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

Tue Jan 23, 2018 4:16 am Post

Great, thank you Keith!