-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I wirte some simple demos, please merge it #40
Closed
Closed
Changes from 10 commits
Commits
Show all changes
105 commits
Select commit
Hold shift + click to select a range
43b9e48
Added pythonic demos
8b76c69
small changed, updated file readme
6ac2be4
fixed drawing demos
e6838b6
rm lena images
0ee26c7
added drawing polygon example
108228d
fixed fg_color/bg_color in hex
cb74369
Small chagned, clean up code
d22ae7a
Using relation path in demo; using captcha image instead of lena
03c5242
Small changed, fixed spell pixsel -> pixel
acdda34
Small changed, using range() instead of deprecated xrange()
065f59f
Fixed draw_text/draw_text.py on Ubuntu
2b54c99
Use "from PIL import Imagexx" instead of "import Imagexx"
1e120cb
fixed reading of EPS pictures
3e709fa
Add .gitignore
353543d
Add support for tox (http://tox.testrun.org/)
msabramo dae289d
Add .travis.yml for Travis CI (http://travis-ci.org/)
msabramo b07b19c
Make things more Python 3 friendly. Python 3 still doesn't work because
msabramo 3bd4f26
Better import of _imaging
emberian b8cabe1
Test travis
aclark4life 8182f04
Test travis
aclark4life 63a4cb7
Change URL
aclark4life cac1398
Save watchers
aclark4life 61e266a
Save issues and comments
aclark4life 323824f
Fix URL
aclark4life 997de56
Fix a bug in quantize() causing PIL crashes.
larsyencken 1a8f45b
Fix opening psd files with RGBA layers when A mode is not of type 65535
tdesvenain f242f72
Added a psd mode (mode 4, 16 bits).
tdesvenain f4d9eac
revert last commit, images rendered didn't match very well
tdesvenain 4d4e2de
Removed doctests.py that made tests of other packages fail.
tdesvenain 8e0c274
Fix formatting of installation summary
aclark4life 833b2b5
Release 1.7.8
aclark4life 3a21c88
Add Image.alpha_composite
twpayne d03b1fb
Add files to the MANIFEST which were missing from the source distribu…
ab94dde
Radius was hardcoded to 2.
4204c24
Make FLI image detection more stringent
cgohlke 23ebec0
Avoid rounding error in Image.alpha_composite
twpayne 5e7920d
Move custom path of JPEG_ROOT, TIFF_ROOT, etc. before system.
a9d42ae
fixed crash loading broken color profile from file-like object
d-schmidt 3ab0a29
py3k: Use string methods instead of string module
ab29a5a
py3k: Update exception usage to modern syntax
edfe106
py3k: Get setup.py to run under python3
4a4d7dc
py3k: Modernize type declarations
71c817c
py3k: Use new buffer protocol
77256df
py3k: Remove HAVE_UNICODE from _imagingft
30333de
py3k: Fix strict aliasing slip-up in _imaging
39484c3
py3k: Add module initialization and unicode/bytes int/long thunks
a948d0a
py3k: Fix strict aliasing warnings under Python 3
7de6ab5
py3k: Use "y#" code in PyArg_ParseTuple where we expect byte data
e1009da
py3k: Import Christoph Gohlke's test suite
c35207c
py3k: Backport Gohlke's tests to run on 2.6/2.7
3400e6b
FIX: Handle long values in _imaging getink
f760f9f
py3k: Provide the missing pngtest_bad.png.base64
4f120b9
py3k: Remove callable() function
bb1f0b8
py3k: Fix up uses of dictionary views, ranges, and has_key()
48b0e0c
py3k: Rewrite dictionary support for Tiff ImageFileDictionary
f1666cb
py3k: map and filter to list comprehensions
a5e800b
py3k: Add true Unicode support to OleFileIO
3189876
py3k: __nonzero__ is now __bool__
659f1ba
py3k: Use isinstance for numbers and sequences
61038ad
py3k: Import reduce function
2b31043
py3k: print is a function
7a3feb2
py3k: Remove tuples in parameter lists
6a68d03
py3k: Use relative imports
2a81f62
py3k: sys.maxint renamed to sys.maxsize
9cdb285
py3k: Convert backticks to repr()
2868e0c
py3k: Remove Image types import
59d1372
py3k: __builtin__ module is now builtins
b0f6f95
py3k: Tkinter module is now tkinter
d37a2e1
py3k: Convert StringIO.StringIO to io.BytesIO
1a82abc
py3k: Integer long literals are no longer valid syntax
da5ca4c
py3k: Change apply() to unpacking syntax
73f7c7a
py3k: 2to3's "idiom" filter
67316d7
py3k: Map long type to int
12d8977
py3k: Sort by key, not cmp
952685f
py3k: Type coercion is gone
3c448d8
py3k: Publish both frombytes and fromstring in C modules for old Python
6f797c5
py3k: The big push
cb979c4
py3k: Allow slicing for paths
cgohlke ebc23bf
py3k: Remove ancient Python hacks
d6c6dd4
py3k: FIX: Bad upside-down check in BmpImagePlugin
825718a
py3k: FIX: TGA missing o8 declaration
5addfab
py3k: Get rid of _ParserFile; io.BytesIO does its job
727c068
py3k: Actually fix the EPS encoder
0bc8cfc
py3k: Add PCX to roundtrip test
5bc836b
py3k: Add Photoshop sanity check
348e970
py3k: Add .FLI sanity check, and fix palette bytes bug
152da84
py3k: Rewrite PdfImagePlugin into something more legible
bd957a9
py3k: Add TarIO test
730c6dd
py3k: Add XPM read test
965928c
py3k: Add Windows icon sanity test
2891d5a
py3k: Remove use_2to3 from setup.py
9ab3ed3
py3k: inquiry is now lenfunc
34ad0b7
py3k: Issue warnings when using the old fromstring/tostring
72c43ef
Fix tox test running: port selftest.py to Python 3; make it clear Pyt…
kmike 330b26a
Update the manifest to include a lot of missing files
a15e762
Make pysane Python3-compatible
manisandro 0a8d35f
Set up Sane error object as exception instead of string
1a1e19d
Handle Sane option strings as Unicode strings
97bf36d
Modified map.c to fix some MSVC10 compilation errors.
14162dc
fixed an error with utf-8 chars in color profile names
d-schmidt e87ad2a
Added possibility to save gifs with a custom palette when using color…
d-schmidt 8fd4868
added option to load truncated image-files
d-schmidt 78a0ab5
Added possibility to save exif information in jpeg-files
d-schmidt 8db7169
Merge remote-tracking branch 'upstream/master'
1746903
py3k: Use python3 version print
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*.o | ||
*.pyc | ||
build/ | ||
dist/ | ||
.DS_Store | ||
.hg/ | ||
.hgignore | ||
.idea/ | ||
.project/ | ||
Demos/ignores/ | ||
Pillow.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# About | ||
|
||
Some simple Pillow demos | ||
|
||
how to run | ||
|
||
[ -d image_resources ] || mkdir image_resources | ||
wget http://upload.wikimedia.org/wikipedia/commons/6/69/Captcha.jpg -O image_resources/captcha.jpg | ||
python crop/crop.py | ||
|
||
## Build it on Mac OS X 10.6.* | ||
|
||
Build an egg for i386 with Python 2.5/Python 2.6 | ||
|
||
export ARCHFLAGS="-arch i386" | ||
export CC="/usr/bin/gcc-4.0 -arch i386" | ||
|
||
python2.5 setup.py bdist_egg | ||
python2.6 setup.py bdist_egg | ||
|
||
Build an egg for x86_64 with Python 2.7(install it via MacPorts) | ||
|
||
python setup.py bdist_egg | ||
|
||
|
||
## Install it via package management system | ||
|
||
HomeBrew is cool, you could use it instead of MacPorts on OS X. | ||
|
||
|
||
## See also | ||
|
||
PIL Handbook | ||
|
||
- http://www.pythonware.com/library/pil/handbook/index.htm | ||
|
||
|
||
PIL Tutorial | ||
|
||
- http://www.pythonware.com/library/pil/handbook/introduction.htm | ||
- http://nadiana.com/category/pil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image | ||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
file_path = os.path.join(parent_path, "image_resources", "captcha.jpg") | ||
|
||
im = Image.open(fp = file_path) | ||
im = im.draft("L", im.size) | ||
w, h = im.size[0], im.size[1] | ||
pixels = im.load() | ||
|
||
print "width:", w | ||
print "high:", h | ||
print "white(255) ~ black(0):", pixels[0, 0] | ||
|
||
def print_im(im, w=None, h=None): | ||
if isinstance(im, Image.Image): | ||
w, h = im.size[0], im.size[1] | ||
pixels = im.load() | ||
else: | ||
pixels = im | ||
|
||
for x in range(w): | ||
for y in range(h): | ||
|
||
if pixels[x, y] > 128: | ||
print " ", | ||
else: | ||
print "1", | ||
|
||
print_im(im, w, h) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image | ||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
file_path = os.path.join(parent_path, "image_resources", "captcha.jpg") | ||
|
||
im = Image.open(fp = file_path) | ||
|
||
left_upper_x, left_upper_y = 0, 0 | ||
right_lower_x, right_lower_y = 100, 50 | ||
box = (left_upper_x, left_upper_y, right_lower_x, right_lower_y) | ||
|
||
region = im.crop(box) | ||
|
||
new_filename = "x".join([str(i) for i in box]) + ".jpg" | ||
region.save(os.path.join(PWD, new_filename)) |
21 changes: 21 additions & 0 deletions
21
Demos/cutting_pasting_and_merging/cutting_pasting_and_merging.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image | ||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
file_path = os.path.join(parent_path, "image_resources", "captcha.jpg") | ||
|
||
im = Image.open(fp = file_path) | ||
|
||
left_upper_x, left_upper_y = 10, 10 | ||
right_lower_x, right_lower_y = 50, 50 | ||
box = (left_upper_x, left_upper_y, right_lower_x, right_lower_y) | ||
|
||
region = im.crop(box) | ||
|
||
region = region.transpose(Image.ROTATE_90) | ||
im.paste(region, box) | ||
|
||
new_filename = "C-c-C-v-left" + ".jpg" | ||
im.save(os.path.join(PWD, new_filename)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image | ||
import ImageDraw | ||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
|
||
BLACK = "#000000" | ||
WHITE = "#ffffff" | ||
|
||
canvas_w, canvas_h = 100, 100 | ||
im = Image.new(mode="RGB", size=(canvas_w, canvas_h), color=WHITE) | ||
|
||
draw = ImageDraw.Draw(im=im) | ||
|
||
left_top_x, left_top_y = 10, 10 | ||
right_bottom_x, right_bottom_y = 30, 100 | ||
box = (left_top_x, left_top_y, right_bottom_x, right_bottom_y) | ||
|
||
draw.line(xy=box, fill=BLACK, width=1) | ||
|
||
im.save(os.path.join(PWD, "draw_line.jpg")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image | ||
import ImageDraw | ||
|
||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
|
||
BLACK = "#000000" | ||
WHITE = "#ffffff" | ||
|
||
canvas_w, canvas_h = 100, 100 | ||
im = Image.new(mode="RGB", size=(canvas_w, canvas_h), color=WHITE) | ||
|
||
draw = ImageDraw.Draw(im=im) | ||
|
||
#xy = (p1_x, p1_y) | ||
#or | ||
#xy = (p1_x, p1_y, p2_x, p2_y, p3_x, p3_y) | ||
|
||
points = ((10, 10), (40, 10), (55, 35), (40,50)) | ||
for point in points: | ||
draw.point(xy=point, fill=BLACK) | ||
|
||
im.save(os.path.join(PWD, "draw_points.jpg")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image | ||
import ImageDraw | ||
|
||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
|
||
BLACK = "#000000" | ||
WHITE = "#ffffff" | ||
RED = "#ff0000" | ||
|
||
canvas_w, canvas_h = 100, 100 | ||
im = Image.new(mode="RGB", size=(canvas_w, canvas_h), color=WHITE) | ||
|
||
draw = ImageDraw.Draw(im=im) | ||
|
||
#xy = (p1_x, p1_y) | ||
#or | ||
#xy = (p1_x, p1_y, p2_x, p2_y, p3_x, p3_y) | ||
|
||
xy = ((10, 10), (40, 10), (55, 35), (40,50)) | ||
draw.polygon(xy=xy, fill=RED, outline=BLACK) | ||
im.save(os.path.join(PWD, "draw_polygon.jpg")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image | ||
import ImageDraw | ||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
|
||
BLACK = "#000000" | ||
WHITE = "#ffffff" | ||
|
||
canvas_w, canvas_h = 100, 100 | ||
im = Image.new(mode="RGB", size=(canvas_w, canvas_h), color=WHITE) | ||
|
||
draw = ImageDraw.Draw(im=im) | ||
|
||
left_top_x, left_top_y = 10, 10 | ||
right_bottom_x, right_bottom_y = 30, 100 | ||
box = (left_top_x, left_top_y, right_bottom_x, right_bottom_y) | ||
|
||
draw.rectangle(xy=box, fill=BLACK, outline=None) | ||
|
||
im.save(os.path.join(PWD, "draw_rectangle.jpg")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
from PIL import Image, ImageDraw, ImageFont | ||
|
||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
|
||
BLACK = "#ffffff" | ||
WHITE = "#000000" | ||
|
||
fg_color = WHITE | ||
bg_color = BLACK | ||
|
||
|
||
canvas_w, canvas_h = 180, 50 | ||
im = Image.new(mode="RGB", size=(canvas_w, canvas_h), color=WHITE) | ||
|
||
draw = ImageDraw.Draw(im=im) | ||
|
||
left_top_x, left_top_y = 10, 10 | ||
begin = left_top_x, left_top_y | ||
|
||
text = "hello world" | ||
|
||
if sys.platform == "darwin": | ||
filename = "/Library/Fonts/Microsoft/Times New Roman Bold.ttf" | ||
elif sys.platform == "win32": | ||
#filename = "C:/Windows/Fonts/timesbd.ttf" | ||
filename = "timesbd.ttf" | ||
else: | ||
raise Exception | ||
font_size = 26 | ||
font = ImageFont.truetype(filename=filename, size=font_size) | ||
|
||
draw.text(xy=begin, text=text, fill=BLACK, font=font) | ||
|
||
im.save(os.path.join(PWD, "draw_text.bmp")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image | ||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
file_path = os.path.join(parent_path, "image_resources", "captcha.jpg") | ||
|
||
im = Image.open(fp=file_path) | ||
|
||
#new_im = im.transpose(Image.FLIP_LEFT_RIGHT) | ||
#new_filename = os.path.splitext(filepath)[0] + "flip_left_right" + ".jpg" | ||
|
||
new_im = im.transpose(Image.FLIP_TOP_BOTTOM) | ||
new_filename = os.path.splitext(os.path.basename(file_path))[0] + '-' + "flip_top_bottom" + ".jpg" | ||
|
||
new_im.save(os.path.join(PWD, new_filename)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image | ||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
|
||
file_path = os.path.join(parent_path, "image_resources", "captcha.jpg") | ||
|
||
im = Image.open(fp=file_path) | ||
|
||
# "L" (8-bit pixels, black and white) | ||
# http://www.pythonware.com/library/pil/handbook/concepts.htm | ||
new_im = im.convert("L") | ||
new_file_name = os.path.splitext(os.path.basename(file_path))[0] | ||
new_file_name = new_file_name + '-' + 'grayscale' + '.bmp' | ||
|
||
new_im.save(os.path.join(PWD, new_file_name)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image, ImageDraw | ||
|
||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
file_path = os.path.join(parent_path, "image_resources", "captcha.jpg") | ||
|
||
BLACK = 0 | ||
WHITE = 255 | ||
# white(255) ~ black(0) | ||
|
||
im = Image.open(fp = file_path) | ||
w, h = im.size[0], im.size[1] | ||
|
||
print "width:", w | ||
print "high:", h | ||
|
||
|
||
im = im.draft("L", im.size) | ||
|
||
pixsels = im.load() | ||
|
||
|
||
for x in range(w): | ||
for y in range(h): | ||
if pixsels[x, y] > 128: | ||
pixsels[x, y] = WHITE | ||
else: | ||
pixsels[x, y] = BLACK | ||
|
||
|
||
counts = [] | ||
for x in range(w): | ||
count = len([1 for y in range(h) | ||
if pixsels[x, y] is BLACK]) | ||
|
||
counts.append(count) | ||
|
||
|
||
hist_im = Image.new(mode="L", size=(w, h), color=WHITE) | ||
draw = ImageDraw.Draw(hist_im) | ||
h_step = h / max(counts) | ||
|
||
for x in xrange(w): | ||
left_top_x, left_top_y = x, h - counts[x] * h_step | ||
right_bottom_x, right_bottom_y = x + 1, h | ||
box = (left_top_x, left_top_y, right_bottom_x, right_bottom_y) | ||
draw.rectangle(xy=box, fill=BLACK) | ||
|
||
new_file_name = os.path.splitext(os.path.basename(file_path))[0] | ||
new_file_name = new_file_name + '-' + 'histogram' + '.bmp' | ||
|
||
hist_im.save(os.path.join(PWD, new_file_name)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import Image | ||
|
||
|
||
PWD = os.path.dirname(os.path.realpath(__file__)) | ||
parent_path = os.path.dirname(PWD) | ||
|
||
file_path = os.path.join(parent_path, "image_resources", "captcha.jpg") | ||
|
||
im = Image.open(fp=file_path) | ||
w, h = im.size[0], im.size[1] | ||
|
||
print "format:", type(im.format), im.format | ||
print "info:", type(im.info), im.info | ||
print "mode:", type(im.mode), im.mode | ||
print "size:", type(im.size), im.size | ||
print "bands:", type(im.getbands()), im.getbands() | ||
print "histogram:", type(im.histogram()) | ||
|
||
data = im.getdata() | ||
print "getdata:", type(data) | ||
assert len(im.getdata()) == w * h |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is never used. Why does it exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has deleted in new commit.