Use better names and skip loading/storing/reloading images for no purpose.
You are working on the wrong images data - you read the pixel from x = pixelsNew[j,i][0]
which is your newly created image - it has no tigerdata in it yet.
I prefer to work with RGB - so I can f.e. tune the grayscaling to use R over B etc. If you'd rather operate on "LA" images, uncomment the "LA" lines and comment the "RGB" lines.
from PIL import Image
def grayscale(picture, thresh):
"""Grayscale converts picture, assures resulting pictures are
inside range thres by limiting lowest/highest values inside range"""
res = Image.new(picture.mode, picture.size)
width, height = picture.size
minT = min(thresh)
maxT = max(thresh)
for i in range(0, width):
for j in range(0, height):
pixel = picture.getpixel((i,j))
a = int( (pixel[0] + pixel[1] + pixel[2]) / 3) # RGB
# a = pixel[0] # LA
a = a if a in thresh else (minT if a < minT else maxT)
res.putpixel((i,j),(a,a,a)) # RGB
# res.putpixel((i,j),(a)) # LA
res.show()
return res # return converted image for whatever (saving f.e.)
tiger = Image.open(r"tiger.jpg").convert("RGB")
# tiger = Image.open(r"tiger.jpg").convert("LA")
gray = grayscale(tiger, thresh = range(50,200) )
gray.save("newImage.png")
Your input:

thresholded with range(50,250)
:

Disclaimer: Code inspired by: plasmon360's answer to Changing pixels to grayscale using PIL in Python