rikukissa / node-red-contrib-image-output

🏞 Easy way of previewing and examining images in your flows
MIT License
13 stars 6 forks source link

Adjustable image heigth #9

Closed bartbutenaers closed 6 years ago

bartbutenaers commented 6 years ago

Hi Riku (@rikukissa ),

Currently the width is defaulted to 200, and by your PR it is also adjustable. As mentioned have (locally) a test version that allows to adjust the width, by dragging with the mouse.

Do you think it would also be useful to make the height adjustable by the user?
Something like this:

image

By default the checkbox would be selected, so the height field is invisible and your node works like it used to do until now: the height is automatically calculated.

When the checkbox is deactivated, the height can be specified. Moreover in that case I could display some extra handles, to make sure the user can also change the height by using the mouse.

Two questions:

For my mouse dragging, I will have to start from your PR ...

Thanks again !! Bart

rikukissa commented 6 years ago

I'm almost inclined to say, we should have the aspect ratio locked by default and omit the Height field altogether. I'd imagine in most cases it's not really useful to be able to adjust width and height separately and by implementing this, we'd open the door for many new questions like if we should also allow selecting between stretching / cropping the image and in what way.

If I'd have to choose between this and being able to change the image size by dragging, I'd definitely go with the latter one.

bartbutenaers commented 6 years ago

Ok, that also makes sense. So we don't add a height property on the config screen.

But what about changing the image size by dragging:

rikukissa commented 6 years ago

I’d only go with width for now. Basically you could have the dragging handle on the right bottom corner of the image, which would at least give a small indication that it’ll resize it while still keeping the aspect ratio

On 24 Feb 2018, at 13:50, bartbutenaers notifications@github.com wrote:

Ok, that also makes sense. So we don't add a height property on the config screen.

But what about changing the image size by dragging:

Do you only want to be able to change the width by dragging (so we also keep the aspect ratio fixed) Or do you want to be able to change both the width and height during dragging? Because in this case we would also need a 'node.height' field under the cover, since the height need to be stored somewhere (to be able to restore it after a Node-Red restart). — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rikukissa/node-red-contrib-image-output/issues/9#issuecomment-368229763, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJqy7p9KYpaBJDcbjLXybc0qEo4ROcGks5tYBPCgaJpZM4SR404.

bartbutenaers commented 6 years ago

Deal ...