Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Jak zapisać miniaturke JPG?
Forum PHP.pl > Forum > PHP
itsover
oto skrypt który ladnie wyświetla mi miniaturke JPG. Jak zrobic by byla ona zapisaywana na serwerze?? Z góry dziekuje za pomoc
[php:1:fa9d486666]
<?php
$katalog="../flixy";
$nazwa="10";
$width="60";
$height="60";
$obrazek="$katalog/$nazwa.jpg";
$obrazek_min="$katalog/$nazwa_m.jpg";
$obrazek_min=ImageCreate($width, $height);
$obrazek_max=ImageCreateFromJPEG("$obrazek");
$obrazek_max_w=ImageSX($obrazek_max);
$obrazek_max_h=ImageSY($obrazek_max);
ImageCopyResized($obrazek_min1, $obrazek_max, 0, 0, 0, 0, $width, $height, $obrazek_max_w, $obrazek_max_h);
$obrazek=ImageJPEG($obrazek_min);
?>[/php:1:fa9d486666]
DeyV
Cytat
int imagejpeg ( resource image [, string filename [, int quality]])


imagejpeg() creates the JPEG file in filename from the image image. The image argument is the return from the imagecreate() function.

The filename argument is optional, and if left off, the raw image stream will be output directly. To skip the filename argument in order to provide a quality argument just use an empty string (''). By sending an image/jpeg content-type using header(), you can create a php script that outputs JPEG images directly.

Notatka: JPEG support is only available if php was compiled against GD-1.8 or later.

quality is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default is the default IJG quality value (about 75).

wystarczy :?
itsover
wystarczylo dziekuje:)
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.