Evernote Images -- Size them consistently and correctly rotate them

Can I use KM (and/or AppleScript) to fix problems with images inside a set of Evernote notes in 1 notebook?

I’ve emailed into Evernote images and text. Done this 10x e.g. all into 1 Notebook. So I end up with 10 notes in 1 Evernote notebook.

But Evernote has not understood the correct orientation of “portrait” photos. It thinks they are “landscape” orientation.

Also Evernote has sized some of the photos too large.

I’d like to loop over all 10 of the notes in my 1 notebook and fix the orientation problems and set the size to be consistent.

(I’d also like to merge the 10 notes into 1 note.)

Thanks for any opinions.

I won't say this is impossible, but it is very challenging, because Evernote does NOT directly expose the images to scripting.

What could be done is to manually process one EN Note at a time. In each Note, move the mouse over the image, or select the image, and trigger a macro which will process the image.

Here is a macro I use to right-click on the image and select "SnagIT", which I then confirm by pressing RETURN.

Of course, you could use any image processing you want instead of opening in SnagIT. I'll leave that up to you and/or others to determine.

##Macro Library   [EN] Open Evernote Note Image in SnagIT


####DOWNLOAD:
<a class="attachment" href="/uploads/default/original/2X/2/2079270566a23433745feb69a6a4d375027471f9.kmmacros">[EN] Open Evernote Note Image in SnagIT.kmmacros</a> (30 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**

---

###ReleaseNotes

Author.@JMichaelTX

**PURPOSE:**

* **Select the "SnagIT" app to OPEN the Image Under the Mouse Position, in an Evernote Note**

HOW TO USE:

1. In an Evernote Note, Position the Mouse over the Image you want to edit in SnagIT
2. Trigger this macro.
3.  It will select "SnagIT" in the Context Menu
4.  Do ONE of the Following:
  * Press RETURN to Open the Image in SnagIT
  * Press ESC to CANCEL the process/macro
  * Use ARROW keys to select another app, and press RETURN
5. IF the Image is NOT Found, a notification and sound is provided.

**MACRO SETUP**

* TRIGGER
  * I suggest `CTRL I`
  * Macro Group:  Put in Group that is restricted to Evernote.
.
* FOUND IMAGE
  * Most likely you will need to replace the image used in the "IF Copy Image is Found.." with an image of the "Copy Image" in the Context menu on your system.
  * You may also need to adjust the "fuzziness" of the Found Image Condition to work on your Mac.

WHAT IT DOES:

1. It searches for the image of "Copy Image" in the Context (Right-click) menu
2. It uses the KM enhanced, detailed, image search limited to a small area
3. After the Image is Found, a "RIGHT-CLICK" of the mouse is issued.
4. Then, using keystrokes, 
  * "Open With" is selected
  * RIGHT-ARROW to open the submenu
  * "Snagit" to select the SnagIT app
5. It is then ready for you to press RETURN or ESC
.
6. If the image is NOT found, a notification with sound is provided.

TAGS:  @FoundImage @Evernote @Snagit @Image

USER SETTINGS:
  * Any Action in magenta color is designed to be changed by end-user
  * This macro uses Google Search and Google Chrome, but can be easily changed

ACTION COLOR CODES
  * To facilitate the reading, customizing, and maintenance of this macro,
      key Actions are colored as follows:
  * GREEN      -- Key Comments designed to highlight main sections of macro
  * MAGENTA -- Actions designed to be customized by user
  * YELLOW   -- Primary Actions (usually the main purpose of the macro)
  * ORANGE  -- Actions that permanently destroy Varibles or Clipboards

REQUIRES:  
(1)  Keyboard Maestro Ver 7.2.1+
(2)  Yosemite (10.10.5)+


---


<img src="/uploads/default/original/2X/1/166597951fc0c3fffd03166b84f2d5d4957db5d1.png" width="458" height="1265">

Good point. Thanks for the code.

I’m not tied to Evernote software for this project. Any ideas on an alternative? I want to email in random thoughts+photos from IOS and when I get back to my Mac I rearrange and edit notes slightly then export it into a single DOCX (or HTML).

It would need the ability to email-into the software various notes containing ad-hoc text and photos. If that software understood the correct orientation (and could resize automatically) of an iOS photo that would be ideal (that misunderstanding seems to be a common problem across lots of software). I do need to be able to merge those notes together (easy-manually or KM/Applescript) and I do need to be able to export them to HTML or DOCX. I note also that the note layout with photos gets screwed up in Evernote. All of this sounds simple but I can’t find any software that can do this.

Back to Evernote and my OP: Maybe I could find a way to use KM to correctly reorientate just the originally “portrait” photos? And to resize all photos to a consistent size. By pressing buttons on the Evernote dialogs. Not obvious how to ID the correct photos etc. though.

P.S. Another problem is the messed up Evernote Layout – If you mail-in 5 photos separated by 5 lots of descriptive text (one per photo) you will get in Evernote 5 batches of text followed by 5 photos. Can KM/AppleScript address any of this?

Here's a macro that does some of what you are asking for.
It operates on one Evernote Note at a time, and rotates the selected image (to the left) using the Preview app, and then saves back to Evernote.

Of course you can change and add to what is done in Preview.
Hopefully this will get you started. Since it requires you to manually select the image (by moving the mouse over the image), I don't see any way to automate the process for a bunch of Notes.

Good luck, and let us know how it goes.

##Macro Library   [EN] Rotate Image in Evernote Using Preview


####DOWNLOAD:
<a class="attachment" href="/uploads/default/original/2X/c/c11a6a2759f9bc9d81bb4249acbdd8bcfbff50b5.kmmacros">[EN] Rotate Image in Evernote Using Preview.kmmacros</a> (32 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**

---

###Use Case

* Rotate Image in Evernote Note

---

###ReleaseNotes

1. Open an Evernote Note with an Image
2. Move Mouse Over the Image to Rotate
3. Trigger this macro

NOTE: Macro is set to Rotate LEFT.
You can change this to RIGHT or other options just by changing the Preview Menu Action.

<img src="/uploads/default/original/2X/5/58ea96e7f6e87f25ab1b02ca8a10fbaaa08b832c.png" width="424" height="155">

---


<img src="/uploads/default/original/2X/f/fbf4271ad55b7a2e2900455fa3d342a4588efcc2.png" width="459" height="2193">
1 Like