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 | : 3.136.18.192
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 /
stph /
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 : copyrotated.c
/* $Id$ */ #include "gd.h" #include <stdio.h> #include <stdlib.h> #include <math.h> gdImagePtr loadImage(const char *name) { FILE *fp; gdImagePtr im; fp = fopen(name, "rb"); if (!fp) { fprintf(stderr, "Can't open jpeg file\n"); return NULL; } im = gdImageCreateFromJpeg(fp); fclose(fp); return im; } int savePngImage(gdImagePtr im, const char *name) { FILE *fp; fp = fopen(name, "wb"); if (!fp) { fprintf(stderr, "Can't save png image fromtiff.png\n"); return 0; } gdImagePng(im, fp); fclose(fp); return 1; } int main(int argc, char **arg) { gdImagePtr im, im2; int new_width, new_height; double angle, a2; if (argc < 3) { fprintf(stderr, "Usage: copyrotated [angle in degree] [filename.png]\n"); return 1; } angle = strtod(arg[1], 0); im = loadImage(arg[2]); if (!im) { fprintf(stderr, "Can't load PNG file <%s>", arg[1]); return 1; } /* cos adj hyp (cos = adjacent / hypothenus) sin op hyp (sin adjacent / hypothenus) + 10 pixels margin */ /* to radian */ a2 = angle * .0174532925; new_width = ceil(cos(a2) * gdImageSX(im)) + fabs(sin(a2) * gdImageSY(im)); new_height = ceil(cos(a2) * gdImageSY(im)) + fabs(sin(a2) * gdImageSX(im)); im2 = gdImageCreateTrueColor(new_width, new_height); if (!im2) { fprintf(stderr, "Can't create a new image"); gdImageDestroy(im); return 1; } gdImageAlphaBlending(im2, 0); gdImageFilledRectangle(im2, 0, 0, gdImageSX(im2), gdImageSY(im2), gdTrueColorAlpha(127,0,0,127)); gdImageCopyRotated(im2, im, new_width/2, new_height/2, 0, 0, gdImageSX(im), gdImageSY(im), angle); gdImageSaveAlpha(im2, 1); if (!savePngImage(im2, "rotated.png")) { fprintf(stderr, "Can't save PNG file rotated.png"); gdImageDestroy(im); gdImageDestroy(im2); return 1; } gdImageDestroy(im2); gdImageDestroy(im); return 0; }
Close