Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I made a cheesy application with a bash script using CocoaDialog, and within this application I need to modify the size of a photo. So, I researched a little and found the sips command; and it works perfectly when I execute my script directly from Terminal. Unfortunately, when the script is executed from the app being clicked on, the image isn't modified at all. I read through the sips man page, and found nothing that would solve my problem. If you have any alternatives for editing a photo in this situation, or even something that I may be missing within the sips command, please let me know.

share|improve this question

closed as too localized by Gilles, Renan, Stéphane Gimenez, jasonwryan, warl0ck Sep 7 '12 at 7:22

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Are you sure it is executed? (This site also mentions this "droplet" which you could check out, maybe it's instructional) There also is ImageMagick but I don't see why it should work if sips doesnt. –  sr_ Apr 19 '12 at 8:06
Thanks for your reply. I am not entirely sure if it is being executed. The rest of the app works perfectly, but the image is not resized when I click on the application. When I execute the script inside of Contents/MacOS from Terminal, I get the same results, but the image is not resized. I did find ImageMagick earlier, but it is overkill for just resizing a photo. –  Cade Apr 19 '12 at 8:32
It seems hard to help you without seeing at least the relevant part of the script, I think. Could you include it in your question? –  sr_ Apr 19 '12 at 8:33
This is the most insane thing that I have ever encountered. So, somehow when I was writing this script I managed to get this "×" in the place of this "x" in my list of dimensions (eg 1280×800 instead of 1280x800). Then later on, when I needed to split the height and the width apart for sips to interpret, I used cut -d\x -f1/2. I noticed the weird results and ignored it because I was being lazy, and replaced it with cut -c3-6 and 8-. But if you run echo "×" | wc and then echo "x" | wc you will see that the smaller x has one extra character. –  Cade Apr 19 '12 at 10:43
... I would have had this solved a lot earlier if it hadn't worked when I ran the script in Terminal, but for some reason that character is interpreted slightly different when you execute it outside of a shell. Thank you for your help! I learned my lesson. hahaha –  Cade Apr 19 '12 at 10:43

Browse other questions tagged or ask your own question.