Showing 3 out of total 125
how to fix php 8.1.2 GD image resize rotation problem imagecopyresampled
Author : Anonymous Publish Time : 11 Nov 2023 02:12:46
when upload image and resize images to server,
some images was rotated by mistake, why the original image is right but the resize image is rotated ?
this was happened when we upload the images which was rotated from the windows OS
when we use imagecopyresampled to generate the resized images, the rotation information was lost (or is the original 'Orientation' when the picture was taken)
so we should use
$exif = exif_read_data($sourceImg);
if (!empty($exif['Orientation'])) {
switch ($exif['Orientation']) {
case 8:
$thumb = imagerotate($thumb, 90, 0);
break;
case 3:
$thumb = imagerotate($thumb, 180, 0);
break;
case 6:
$thumb = imagerotate($thumb, -90, 0);
break;
}
}
to check the 'Orientation' and rotated it to right before generate samall images (using
imagewebp or other format
reason for ssh server refused our key pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Author : Anonymous Publish Time : 07 Nov 2023 23:00:32
pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
prestashop 输出带格式的html nofilter
Author : Anonymous Publish Time : 03 Nov 2023 16:35:45
{$category->description nofilter}
变量后面加 nofilter