9 More Discussions You Might Find Interesting
1. Programming
Hi Experts,
Good morning.
I am trying to convert my hello.py to hello .exe file.
I followed the steps as mentioned in the documentation but getting errors in the end. Please help.
What I did as below--
Created hello.py file
print ("Hello world!")
raw_input('')
Then... (0 Replies)
Discussion started by: shekhar_4_u
0 Replies
2. Shell Programming and Scripting
Hi Guys,
I have used Perl scripting to convert XLSX file to TXT file using Perl module Spreadsheet::XLSX.
I processed one XLSX file having one column and 65k rows of data .
Strangely ,It is merging data for every 2047 row and I could see data in TXT file as Ex: Suppose in XLSX file ,if... (2 Replies)
Discussion started by: Rajk459
2 Replies
3. UNIX for Dummies Questions & Answers
Hi!
On my Ubuntu I have thousands of files in a couple hundred directories. I'm trying to convert the pdf's to jpg's.
I used this command in terminal:
for fname in *.pdf; do convert $fname ${fname%.pdf}.jpg; doneIt works great but the problem is I have to run this in terminal for each... (2 Replies)
Discussion started by: martinsmith
2 Replies
4. UNIX for Dummies Questions & Answers
Hi, I am new to Unix.
Actually, I am using Terminal from MAC OSX Snow Leopard. I have installed XCode and wget 1.14 today.
I just want to download all of the jpg files from a specific blog (from blogspot). But its not working.
Here is the command I use:
wget -r -nd -A jpg come-se
All... (3 Replies)
Discussion started by: bruleke
3 Replies
5. UNIX for Dummies Questions & Answers
I would like to delete all files but keep all the .JPG files.
How can this be accomplished?
Thanks in advance (8 Replies)
Discussion started by: Xterra
8 Replies
6. Shell Programming and Scripting
Hi, Dear all:
One question ! ^_^
I'm using bash under Ubuntu 9.10.
My question is not to rename all ".JPG" files to ".jpg" in a single folder, but to rename all ".JPG" files to ".jpg" in all subfolders.
To rename all ".JPG" to ".jpg" in a single folder,
for x in *.JPG; do mv "$x"... (7 Replies)
Discussion started by: jiapei100
7 Replies
7. UNIX for Dummies Questions & Answers
I am writing a text for LaTeX compile. I think that my grace figs need to be .ps or .eps files for incorporation. Can one just do a 'save as X.eps'
for this, or is another method required? Thanks- Marshall (6 Replies)
Discussion started by: blann
6 Replies
8. AIX
Hello
I would like to see an jpeg image with aix. It is possible ?
how can i do ?
thank you (4 Replies)
Discussion started by: pascalbout
4 Replies
9. UNIX for Dummies Questions & Answers
Hello.
I have a large number of EPS files and a lesser number of PDFs that I need to convert to GIFs/JPGs using a Unix system. Is there a unix utility or application out there that can do this conversion?
Thank you in advance for any help you can provide.
-Pook (1 Reply)
Discussion started by: PookJP
1 Replies
IMAGEJPEG(3) 1 IMAGEJPEG(3)
imagejpeg - Output image to browser or file
SYNOPSIS
bool imagejpeg (resource $image, [string $filename], [int $quality])
DESCRIPTION
imagejpeg(3) creates a JPEG file from the given $image.
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
o $filename
-The path to save the file to. If not set or NULL, the raw image stream will be outputted directly. To skip this argument in order
to provide the $quality parameter, use NULL.
o $quality
-$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).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Outputting a JPEG image
<?php
// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
// Set the content type header - in this case image/jpeg
header('Content-Type: image/jpeg');
// Output the image
imagejpeg($im);
// Free up memory
imagedestroy($im);
?>
The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : Outputting a JPEG image
Example #2
Saving a JPEG image
<?php
// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
// Save the image as 'simpletext.jpg'
imagejpeg($im, 'simpletext.jpg');
// Free up memory
imagedestroy($im);
?>
Example #3
Outputting the image at 75% quality
<?php
// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
// Set the content type header - in this case image/jpeg
header('Content-Type: image/jpeg');
// Skip the filename parameter using NULL, then set the quality to 75%
imagejpeg($im, NULL, 75);
// Free up memory
imagedestroy($im);
?>
NOTES
Note
JPEG support is only available if PHP was compiled against GD-1.8 or later.
Note
If you want to output Progressive JPEGs, you need to set interlacing on with imageinterlace(3).
SEE ALSO
imagepng(3), imagegif(3), imagewbmp(3), imageinterlace(3), imagetypes(3).
PHP Documentation Group IMAGEJPEG(3)