Title: PIL/pillow: Unable to use putpixel() to change a pixel value
Tags: python;python-imaging-library;pillow
Question: I'm trying to run:
from PIL import Image
import os
os.chdir('C:\\.....FOLDER.....')
catIm = Image.open('zophie.png')
width, height = catIm.size
quartersizedIm = catIm.resize((int(width / 4), int(height / 4)))
for x in range(0,102,1):
for y in range(0,136,1):
quartersizedIm.putpixel((x,y),(0,0,255,255))
quartersizedIm.putpixel((x,y))=quartersizedIm.putpixel((x,y))+100
I'm unable to change pixels to fixed value, getting the error:
cant assign to function call
Comment: Sorry, am new to stack. still learning to format

Comment: If you would look at the full error instead of the snip you posted, you'd know it was complaining about `quartersizedIm.putpixel((x,y))=`.



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2017:00:02/08/17', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><python-imaging-library><pillow>', 'Title': 'PIL/pillow: Unable to use putpixel() to change a pixel value', 'ViewCount': 228, 'id': 42105243, 'user_AboutMe': None, 'user_AccountId': 10202914.0, 'user_DisplayName': 'Vijaykumar', 'user_Reputation': 1.0, 'user_Views': 1.0, 'user_id': 7532508.0}}