Displaying a scaled down picture and drawing a rectangle on it

50 views
Skip to first unread message

Cecil Westerhof

unread,
Jul 19, 2016, 6:18:57 AM7/19/16
to seesa...@googlegroups.com
At the moment I am using Image Magick on the command line with trial and error to crop the right part of the photo. For example:
    https://www.instagram.com/p/BH7r97NgvFX/

But this is a ‘bit’ of work. So I was thinking about writing a Clojure program to do the cropping for me. That would save me a lot of time I think and the best way to learn a language is to use it. I think I could manage most parts, but I need a little help.

My pictures have a dimension of 5,184x3,456 and I need to make a crop of 1.080x1.080. This is a little to big for my screen. So I am thinking about dividing everything by 8.

I need to know two things:
- How would I display the picture as a 648x432 picture?
- How do I draw a square of 135x135 on it? So I can select what to crop.

--
Cecil Westerhof

Cecil Westerhof

unread,
Jul 19, 2016, 9:49:26 AM7/19/16
to seesa...@googlegroups.com

​I first wrote a Java program. ;-) It could be made better, at the moment I have to click to position the square, but that can always be later improved. (Dragging would be better, or there should probably be both options.)

Am I on the right track, or should I do this completely different?
If I am on the right track, I will translate it to Clojure.

--
Cecil Westerhof
Reply all
Reply to author
Forward
0 new messages