Forum Images are Now Behaving Badly

@peternlewis, did you by chance make a KM Forum update in the last few days?

Something seems to have changed.
Macro images I'm uploading now are show two bad behaviors:

  1. Short images are too large (wide), and are clipped in width.
  2. Long macro images are expanding to the full width of the forum posting space, taking up far too much room.

Here is an example of Issue #2, which I just uploaded a few minutes ago here:

Here's the code for the image:

<img src="/uploads/default/original/2X/7/7ebd0d3619c90d2d4a86d247b682981f059db58d.png" width="459" height="1415">

Note that it states a width of "459", but is displaying much larger.
My quick measurement show it to be "668".

Here's the image:

I noticed that. It seems like posts with macro images are sort of screaming for attention. I liked the former, more subdued presentation, FWIW.

@peternlewis, I have found a clue, perhaps a contributor, to this issue:

I have a new iMac-27 with a 5K monitor, and a ASUS 27 monitor.
I get different image sizes depending on how I capture the image.

SnagIT:  455 x 1500
KM:      918 x 2962

SnagIT is configured to handle the Mac Retina screens.
It appears that the KM app function Edit > Copy as image does not handle Retina.

I did not have this issue with my MBP-15R, so I'm somewhat confused.
Is there a setting/preference for the KM app to deal with this?

If you use Copy Image, it will copy in Retina if available.

You can use a macro to adjust the size of the image (scale down by 50%) if desired.

That seems inconsistent with the other tokens/functions that return screen/window coordinates.

Do you have such a macro handy?

I see there are a couple of KM Actions that could be used.
Would it be better to resize, or change DPI?

@peternlewis, nevermind. I figured it out.

Changing DPI does NOT affect size.

For those that might be interested, here's my TEST Macro:

##Macro Library   Resize Image @TEST


####DOWNLOAD:
<a class="attachment" href="/uploads/default/original/2X/3/3070d3612a996eb455dc636e11fa35d255adfa6f.kmmacros">Resize Image @TEST.kmmacros</a> (4.6 KB)

---

<img src="/uploads/default/original/2X/f/feb0f4cc535d6deae7c41ada5c3e65819c531ca1.jpg" width="458" height="1165">
1 Like

@peternlewis, there are still two issues that need addressing:

  1. The displayed size does NOT reflect the size in the image statement.
<img src="/uploads/default/original/2X/7/7ebd0d3619c90d2d4a86d247b682981f059db58d.png" 
width="459" height="1415">

.
2. When using the KM App export/upload feature, it uses the Retina DPI with no opportunity for us to resize the image.

  • Could you please change this to resize if the screen is Retina?

Thanks.

The trick is to use the single parameter context sensitive IMAGE function:

I can see your point but they are two different things, the Retina image is the correct thing to return - the problem is not with the Retina image, it is with the Discourse forum not displaying it with the correct size.

Better would be for the resulting img code to half to size so that it displays as a retina image, and ideal would be for the forum to figure that out for itself.

And indeed, in the code that posts to the forum is the command:

// probably really want the non-retina size here

I expect the forum software is doing some sort of size limitation on it. But I don't know, you'd have to duplicate the issue on the meta.discourse.org forum and then ask there.

OK, thanks for that. FYI, I searched the KM Wiki for "image scaling" and found nothing.
But I'd still need the IF test for DPI, correct?

Yes. If there was a DPI function, then you could do something like:

IMAGE(Width)/DPI(X)*72

But I don't believe I've implemented a DPI function.

It would be nice to have a KM Preference for “Scale Down Captured Retina Images”