Ask Your Question

Array filled with images

asked 2014-03-16 22:12:40 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'm trying to append some images on an array and dynamically adding the crop length, but I seems to keep getting a weird error. this is what I did

 from SimpleCV import *

imgOri = Image("allCars.jpg")

imgOri = imgOri.scale(400, 400)

pxLength = 0 #ancho del parking

imgList = []

for i in range(3):
    imgList.append(imgOri.crop(0, 70, pxLength,120))

    print imgList[i].show()

    pxLength+= 133

this is the error I get :

WARNING: Can't do a negative crop!

Traceback (most recent call last):
  File "C:\Users\chelo\Documents\college\Concentracion\PY scripts\", line 14, in <module>
    print imgList[i].show()
AttributeError: 'NoneType' object has no attribute 'show'

is this ok? if not, which is the right way?</module>

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-03-16 23:21:41 -0500

chelo666 gravatar image

Nevermind, I got it. I changed pxLength to corX and placed it like this crop(corX, 70, 133, 120) and worked.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-03-16 22:12:40 -0500

Seen: 90 times

Last updated: Mar 16 '14