Resizing Script Help

Started on the old forum in November 2008 · view the original in the archive · old links redirect here

2 replies · 409 views · started 18 years ago · 1 min read

Guest #1

This 2 servers use the same script max.php and one shows thumb on other nothing???

Link 1

Link 2

Script is max.php

CODE<?php $height= 128; $width= 128; // Content type header('Content-type: image/jpeg'); if(!$filename) $filename="./images/nopic.jpg"; // Get new dimensions list($width_orig, $height_orig) = getimagesize($filename);

if ($width && ($width_orig < $height_orig)) { $width = ($height / $height_orig) * $width_orig; } else { $height = ($width / $width_orig) * $height_orig; }

// Resample $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);

// Output imagejpeg($image_p, null, 100); ImageDestroy ($image_p); ?>

Attachments: max.php
Guest #3

QUOTE (GumSlone @ Nov 5 2008, 06:04 PM) <{POST_SNAPBACK}>

Check if the gdlib installed correctly on the server where its does not work

On non working server is:

GD Support enabled GD Version bundled (2.0.34 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.3.5 T1Lib Support enabled GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XPM Support enabled XBM Support enabled

on other:

GD Support enabled GD Version bundled (2.0.34 compatible) GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XPM Support enabled XBM Support enabled

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close