Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.191.54.190
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
bcu /
libgd-gd-2.2.3 /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
CMakeLists.txt
1
KB
-rwxr-xr-x
arc.c
591
B
-rwxr-xr-x
copyrotated.c
1.81
KB
-rwxr-xr-x
crop.c
1.31
KB
-rwxr-xr-x
flip.c
1.18
KB
-rwxr-xr-x
gif.c
1.01
KB
-rwxr-xr-x
nnquant.c
1.15
KB
-rwxr-xr-x
noIcon.pic
62
KB
-rwxr-xr-x
noIcon.sgi
65.04
KB
-rwxr-xr-x
noIcon.tga
150.08
KB
-rwxr-xr-x
noIconAlpha.tga
150.08
KB
-rwxr-xr-x
resize.c
1.02
KB
-rwxr-xr-x
test_crop_threshold.png
7.73
KB
-rwxr-xr-x
tgaread.c
975
B
-rwxr-xr-x
tiffread.c
1.11
KB
-rwxr-xr-x
windows.c
7.3
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : crop.c
/* $Id$ */ #include "gd.h" #include <stdio.h> #include <stdlib.h> void save_png(gdImagePtr im, const char *filename) { FILE *fp; fp = fopen(filename, "wb"); if (!fp) { fprintf(stderr, "Can't save png image %s\n", filename); return; } #ifdef HAVE_LIBPNG gdImagePng(im, fp); #else printf("No PNG support. Cannot save image.\n"); #endif fclose(fp); } gdImagePtr read_png(const char *filename) { FILE * fp; gdImagePtr im; fp = fopen(filename, "rb"); if (!fp) { fprintf(stderr, "Can't read png image %s\n", filename); return NULL; } #ifdef HAVE_LIBPNG im = gdImageCreateFromPng(fp); #else im = NULL; printf("No PNG support. Cannot read image.\n"); #endif fclose(fp); return im; } int main() { gdImagePtr im, im2; im = gdImageCreateTrueColor(400, 400); if (!im) { fprintf(stderr, "Can't create 400x400 TC image\n"); return 1; } gdImageFilledRectangle(im, 19, 29, 390, 390, 0xFFFFFF); gdImageRectangle(im, 19, 29, 390, 390, 0xFF0000); save_png(im, "a1.png"); im2 = gdImageCropAuto(im, GD_CROP_SIDES); if (im2) { save_png(im2, "a2.png"); gdImageDestroy(im2); } gdImageDestroy(im); im = read_png("test_crop_threshold.png"); if (!im) { return 1; } im2 = gdImageCropThreshold(im, 0xFFFFFF, 0.6); if (im2) { save_png(im2, "a4.png"); gdImageDestroy(im2); } gdImageDestroy(im); return 0; }
Close