OCR 'java.awt.image.BufferedImage' object has no attribute 'resize'

Asked by joe fu

I've tried the following code from your suggestion in another OCR question

img = capture(SCREEN) # get the image from the screen (in memory)
img1 = Image.create(img) # create an with the new Image class (still in memory)
imgGrey = img1.convertImageToGrayscale(img1.get()) # does what it says (still in memory)
imgGreyResized = imgGrey.resize(3) # resize the image to about 300dpi (usually 3 as factor is sufficient) (still in memory)

got this error...

[error] AttributeError ( 'java.awt.image.BufferedImage' object has no attribute 'resize' )

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

not sure, but I had to correct this already in the other question:

imgGreyResized = new Image(imgGrey).resize(3)

Can you help with this problem?

Provide an answer of your own, or ask joe fu for more information if necessary.

To post a message you must log in.