summaryrefslogtreecommitdiffstats
path: root/contrib/python/Pillow/py3/libImaging/File.c
diff options
context:
space:
mode:
authormaxim-yurchuk <[email protected]>2025-02-11 13:26:52 +0300
committermaxim-yurchuk <[email protected]>2025-02-11 13:57:59 +0300
commitf895bba65827952ed934b2b46f9a45e30a191fd2 (patch)
tree03260c906d9ec41cdc03e2a496b15d407459cec0 /contrib/python/Pillow/py3/libImaging/File.c
parent5f7060466f7b9707818c2091e1a25c14f33c3474 (diff)
Remove deps on pandas
<https://github.com/ydb-platform/ydb/pull/14418> <https://github.com/ydb-platform/ydb/pull/14419> \-- аналогичные правки в gh Хочу залить в обход синка, чтобы посмотреть удалится ли pandas в нашей gh репе через piglet commit_hash:abca127aa37d4dbb94b07e1e18cdb8eb5b711860
Diffstat (limited to 'contrib/python/Pillow/py3/libImaging/File.c')
-rw-r--r--contrib/python/Pillow/py3/libImaging/File.c78
1 files changed, 0 insertions, 78 deletions
diff --git a/contrib/python/Pillow/py3/libImaging/File.c b/contrib/python/Pillow/py3/libImaging/File.c
deleted file mode 100644
index 76d0abccc4f..00000000000
--- a/contrib/python/Pillow/py3/libImaging/File.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * The Python Imaging Library
- * $Id$
- *
- * built-in image file handling
- *
- * history:
- * 1995-11-26 fl Created, supports PGM/PPM
- * 1996-08-07 fl Write "1" images as PGM
- * 1999-02-21 fl Don't write non-standard modes
- *
- * Copyright (c) 1997-99 by Secret Labs AB.
- * Copyright (c) 1995-96 by Fredrik Lundh.
- *
- * See the README file for information on usage and redistribution.
- */
-
-#include "Imaging.h"
-
-#include <ctype.h>
-
-int
-ImagingSaveRaw(Imaging im, FILE *fp) {
- int x, y, i;
-
- if (strcmp(im->mode, "1") == 0 || strcmp(im->mode, "L") == 0) {
- /* @PIL227: FIXME: for mode "1", map != 0 to 255 */
-
- /* PGM "L" */
- for (y = 0; y < im->ysize; y++) {
- fwrite(im->image[y], 1, im->xsize, fp);
- }
-
- } else {
- /* PPM "RGB" or other internal format */
- for (y = 0; y < im->ysize; y++) {
- for (x = i = 0; x < im->xsize; x++, i += im->pixelsize) {
- fwrite(im->image[y] + i, 1, im->bands, fp);
- }
- }
- }
-
- return 1;
-}
-
-int
-ImagingSavePPM(Imaging im, const char *outfile) {
- FILE *fp;
-
- if (!im) {
- (void)ImagingError_ValueError(NULL);
- return 0;
- }
-
- fp = fopen(outfile, "wb");
- if (!fp) {
- (void)ImagingError_OSError();
- return 0;
- }
-
- if (strcmp(im->mode, "1") == 0 || strcmp(im->mode, "L") == 0) {
- /* Write "PGM" */
- fprintf(fp, "P5\n%d %d\n255\n", im->xsize, im->ysize);
- } else if (strcmp(im->mode, "RGB") == 0) {
- /* Write "PPM" */
- fprintf(fp, "P6\n%d %d\n255\n", im->xsize, im->ysize);
- } else {
- fclose(fp);
- (void)ImagingError_ModeError();
- return 0;
- }
-
- ImagingSaveRaw(im, fp);
-
- fclose(fp);
-
- return 1;
-}