Jul-26-2023, 08:35 AM
(This post was last modified: Jul-26-2023, 08:35 AM by kucingkembar.)
hi, sorry for my bad English,
I tried to remove some lines of a webtoon picture if the line only contain 1 color
(it is just an example, I cannot share real images because it have "rights")
[attachment=2472]
a line that I tested using the "pipet or color picker" tool using different software claims it is white or 255,255,255,
but when I use that code some result is
or is there alternative package that i can use?
Edit : i use combine 1 chapter into 1 file, so the file is large
height : 130312
width: 720
Size : 44,9 MB (47.100.824 bytes)
I tried to remove some lines of a webtoon picture if the line only contain 1 color
(it is just an example, I cannot share real images because it have "rights")
[attachment=2472]
from PIL import Image Image.MAX_IMAGE_PIXELS = None img = Image.open('01.png') width = img.size[0] height = img.size[1] print("height : ",height,"\nwidth: ",width) for h in range(0,height): for w in range(0,width): pix = img.getpixel((h,w)) print("y : ",h,", x : ",w,", RGB Value : ",pix) print(h,w) break #limit to easy debugbut when I use my code in real webtoon images (not image above), the result is wrong:
a line that I tested using the "pipet or color picker" tool using different software claims it is white or 255,255,255,
but when I use that code some result is
Output:y : 1 , x : 696 , RGB Value : (157, 155, 166)
y : 1 , x : 697 , RGB Value : (156, 154, 165)
y : 1 , x : 698 , RGB Value : (155, 153, 164)
y : 1 , x : 699 , RGB Value : (154, 152, 163)
y : 1 , x : 700 , RGB Value : (152, 150, 161)
y : 1 , x : 701 , RGB Value : (149, 147, 158)
y : 1 , x : 702 , RGB Value : (139, 137, 148)
y : 1 , x : 703 , RGB Value : (124, 122, 133)
y : 1 , x : 704 , RGB Value : (90, 89, 97)
y : 1 , x : 705 , RGB Value : (70, 69, 77)
y : 1 , x : 706 , RGB Value : (68, 67, 72)
y : 1 , x : 707 , RGB Value : (22, 22, 24)
y : 1 , x : 708 , RGB Value : (0, 0, 0)
y : 1 , x : 709 , RGB Value : (2, 2, 2)
y : 1 , x : 710 , RGB Value : (0, 0, 0)
y : 1 , x : 711 , RGB Value : (1, 1, 1)
y : 1 , x : 712 , RGB Value : (0, 0, 0)
y : 1 , x : 713 , RGB Value : (0, 0, 0)
is my code, method, or something i don't know?or is there alternative package that i can use?
Edit : i use combine 1 chapter into 1 file, so the file is large
height : 130312
width: 720
Size : 44,9 MB (47.100.824 bytes)