Commit 0512fdb
authored
Fix: Support 'jpg' format in keras.utils.save_img() (#21683)
* Fix save_img(): support 'jpg' format and handle RGBA
* Fix save_img: support 'jpg' format (normalize to JPEG) and add tests
* Fix save_img: normalize jpg→jpeg, handle RGBA→RGB, and improve tests
* Regenerate API directory
* Add save_img to image_utils.py and integration tests for JPG/RGBA handling
* style: fix formatting with format.sh
* Simplify save_img: remove _format, normalize jpg→jpeg, add RGBA→RGB handling and tests
* Simplify save_img: remove _format, normalize jpg→jpeg, add RGBA→RGB handling and tests
* Simplify save_img: remove _format, normalize jpg→jpeg, add RGBA→RGB handling and tests
* fix: use save_format variable to avoid modifying file_format parameter
* fix: handle .jpg format without renaming file, improve tests
* Move save_img tests to unit tests and convert to Keras TestCase
* Move save_img tests to unit tests and convert to Keras TestCase
* Move save_img tests to unit tests and convert to Keras TestCase
* Move save_img tests to unit tests and convert to Keras TestCase
* fix: simplify file format handling and add inferred format test
* fix: simplify file format handling and add inferred format test
* fix: simplify file format handling and add inferred format test1 parent 3882d1d commit 0512fdb
2 files changed
+50
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
178 | 187 | | |
179 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
180 | 191 | | |
181 | | - | |
| 192 | + | |
182 | 193 | | |
183 | 194 | | |
| 195 | + | |
184 | 196 | | |
185 | 197 | | |
186 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
0 commit comments