Forum Archive

photo_text

brumm

I started a new project, comments are welcome.
https://github.com/humberry/photo_text

the_buch

I like this. In concept at least. I'm having difficulty. I run the script, choose a photo, go through the options, and after I enter a selection for mode, nothing happens. I'm not sure if I'm missing something, and I am fairly new to Python so that is possible, but if I am, I haven't figured it out yet. It is a good idea for a script though.

brumm

Hi the_buch

1.) Are you running the camera_roll_resize.py script?

2.) Nothing happens mean you can't see the line "Picture is in process...", can you?

3.) Please post the complete script output.

4.) Which version of pythonista have you installed?

the_buch

The most recent version. I downloaded it a couple weeks ago. And yes, camera_roll_resize.py. There is no output after mode: 0. Like I said, I may have missed something, so perhaps it takes a long time on my ipad for some reason, but I let it sit a few minutes, maybe three, and nothing still. I'll look at it again here in a few when I get finished with what I'm doing, and follow up. Thanks for the speedy response.

brumm

For a quick check you could try this script:
https://github.com/humberry/scene-tutorial/blob/master/intermediate001-1.py

The script only open a photo from the camera roll and shows it.

the_buch

Sorry for the delayed response. I found a similar, though much less featured, script that took a photo from clipboard and resized it to an already specified size. Looking at your script, I implemented implemented the photo picker and got it to save the photo, so I know that aspect of it is working on my iPad. It just seems to do nothing past the mode selection. However, I tried yours a few more times last night. For consistency, I tried the same photo, with the same options down to mode And I only got it go complete once, on black and white. Here is basically just how it looks every time:

Sorry for the delayed response. I found a similar, though much less featured, script that took a photo from clipboard and resized it to an already specified size. Looking at your script, I implemented implemented the photo picker and got it to save the photo, so I know that aspect of it is working on my iPad. It just seems to do nothing past the mode selection. However, I tried yours a few more times last night. For consistency, I tried the same photo, with the same options down to mode And I only got it go complete once, on black and white. Though other tries with that weren't successful. Here is basically just how it looks every time:

Picture-Information: resolution = 1936 x 2592 (5.0 MP), mode = RGBA

!!! Changing the resolution is time-consuming !!! Resolution higher 6000 x 4000 (24MP) can cause an abend!

0 = Auto processing (Resolution = 1936 x 2592), quality = 95%, mode = RGBA
1 = Same resolution (1936 x 2592)
2 = Define resolution
3 = 3MP (2048 x 1536)
5 = 5MP (2592 x 1936)
Resolution: 2

Changing the ratio causes picture deformation!
Width: 500
Height [Enter = 669]:500

Quality (0 - 100): 95

0 = no change (RGBA)
1 = black/white
2 = grey
3 = RGB no transparency
4 = RGB with transparency
5 = CMYK
6 = YCbCr
7 = 32bit Pixel
Mode: 1

I am going to try bringing the script in again. I can't imagine how I could've changed anything accidentally, but I suppose it's possible, though I don't see any outright differences. Can't hurt to try.

brumm

I'm puzzled, because I've run this script so many times without any trouble.

Do you wanna try this:

1) Maybe it's a matter of memory? Have you closed all other apps before running pythonista?

2) I had some trouble with the "Inbox", so I always move my script to another place.

ccc

What device are you running on and what version of iOS and Pythonista?

Also try putting some print statements into the code to isolate/discover exactly which line it is failing on.

the_buch

Good idea, I'll try that too. I'm running the current iOS 7 on an iPad 4. The latest release of Pythonista. I haven't tried it with all other apps closed yet though and I haven't had a chance to re-enter the script and give it a go. It's nearly 3am and I'm finally able to get to bed, so I'll try all of these ideas tomorrow and try to nail the problem. Thanks folks!