my code isnt working for png it works well. everything installed on machine. GD + jpglib
my code in fuctions.php
if ($_GET['_create_precut_images']==1) {
$test_file = '/home/x/public_html/wp-content/themes/template/images/subpages-bg.jpg';
//var_dump(file_exists($test_file));
//var_dump(fopen($test_file,'r'));
$orig_im = imagecreatefromjpeg($test_file);
imagejpeg(
$orig_im,
"/home/x/public_html/work_files/rTDKYTzgFPdjuFeuvHrJg9QbcLdREM/test.jpg"
);
if (0) create_precut_images(
'/home/x/public_html/work_files/rTDKYTzgFPdjuFeuvHrJg9QbcLdREM/full.png',
'/home/x/public_html/work_files/rTDKYTzgFPdjuFeuvHrJg9QbcLdREM/thumb.png',
'/home/x/public_html/work_files/rTDKYTzgFPdjuFeuvHrJg9QbcLdREM/precut.jpg'
,491
);
is there any problem with the code? or maybe a server-side? i tried changing php.ini
and set max limit didnt work well.