Skip to content

Commit cb01322

Browse files
Bump pillow from 12.3.0 to 13.0.0 in /samples/python (#181)
* Bump pillow from 12.3.0 to 13.0.0 in /samples/python Bumps [pillow](https://github.com/python-pillow/Pillow) from 12.3.0 to 13.0.0. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](python-pillow/Pillow@12.3.0...13.0.0) --- updated-dependencies: - dependency-name: pillow dependency-version: 13.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * update samples for pillow 13.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
1 parent 58ed6eb commit cb01322

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎samples/python/04_julia/julia.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
" cl.map_flags.READ, \n",
294294
" 0, width * height, np.uint32)\n",
295295
" with mapped_dst.base:\n",
296-
" (r, g, b, a) = Image.fromarray(mapped_dst.reshape((width, height)), 'RGBA').split()\n",
296+
" (r, g, b, a) = Image.fromarray(mapped_dst.view(np.uint8).reshape((height, width, 4))).split()\n",
297297
" image = Image.merge('RGB', (r, g, b))"
298298
]
299299
},

‎samples/python/04_julia/julia.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
0, gwx * gwy, np.uint32)
136136
with mapped_dst.base:
137137
# note: this generates a 24-bit .bmp file instead of a 32-bit .bmp file!
138-
(r, g, b, a) = Image.fromarray(mapped_dst.reshape((gwy, gwx)), 'RGBA').split()
138+
(r, g, b, a) = Image.fromarray(mapped_dst.view(np.uint8).reshape((gwy, gwx, 4))).split()
139139
image = Image.merge('RGB', (r, g, b))
140140
image.save(filename)
141141
print('Wrote image file {}'.format(filename))

‎samples/python/requirements.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
matplotlib==3.8.2
1+
matplotlib==3.10.9
22
numpy==1.26.3
33
pyopencl==2023.1.4
4-
pillow==12.3.0
4+
pillow==13.0.0
55

66
jupyterlab==4.5.11

0 commit comments

Comments
 (0)