JImage - Set generated image quality Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Support for SchuWebExtensions on JSESimplify image management in articlesSet cookie in from joomla pluginResizing png transparent with JImage, final file not copiedCan dynamic fields generated to form use a jquery event?Joomla Module - Link a Background ImageSet Category and Full Article ImageSetting Specific Session Variable (user specific image folder)JImage - how to get name of thumbnailsMedia component reporting 'Possible IE XSS Attack'J3.8 Module Manager Articles Category generating wrong links
Inverse square law not accurate for non-point masses?
Plotting a Maclaurin series
Hide attachment record without code
Any stored/leased 737s that could substitute for grounded MAXs?
How do Java 8 default methods hеlp with lambdas?
New Order #6: Easter Egg
How do you cope with tons of web fonts when copying and pasting from web pages?
Getting representations of the Lie group out of representations of its Lie algebra
How to get a flat-head nail out of a piece of wood?
malloc in main() or malloc in another function: allocating memory for a struct and its members
Combining list in a Cartesian product format with addition operation?
calculator's angle answer for trig ratios that can work in more than 1 quadrant on the unit circle
Searching extreme points of polyhedron
Why does BitLocker not use RSA?
Proving that any solution to the differential equation of an oscillator can be written as a sum of sinusoids.
Did John Wesley plagiarize Matthew Henry...?
"Destructive power" carried by a B-52?
Pointing to problems without suggesting solutions
Does the universe have a fixed centre of mass?
How to ask rejected full-time candidates to apply to teach individual courses?
By what mechanism was the 2017 UK General Election called?
What is a more techy Technical Writer job title that isn't cutesy or confusing?
Does the main washing effect of soap come from foam?
Is the Mordenkainen's Sword spell underpowered?
JImage - Set generated image quality
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Support for SchuWebExtensions on JSESimplify image management in articlesSet cookie in from joomla pluginResizing png transparent with JImage, final file not copiedCan dynamic fields generated to form use a jquery event?Joomla Module - Link a Background ImageSet Category and Full Article ImageSetting Specific Session Variable (user specific image folder)JImage - how to get name of thumbnailsMedia component reporting 'Possible IE XSS Attack'J3.8 Module Manager Articles Category generating wrong links
I'm using JImage to generate .jpg image thumbnails.
$image = new JImage($image_src);
$resizedImage = $image->cropResize($thumb_width, $thumb_height, true);
$thumb = $resizedImage->toFile(JPATH_BASE.'path/to/photo_thumbnail.jpg', IMAGETYPE_JPEG);
How can I set the generated jpg image quality to 70%?
joomla-3.x jimage
add a comment |
I'm using JImage to generate .jpg image thumbnails.
$image = new JImage($image_src);
$resizedImage = $image->cropResize($thumb_width, $thumb_height, true);
$thumb = $resizedImage->toFile(JPATH_BASE.'path/to/photo_thumbnail.jpg', IMAGETYPE_JPEG);
How can I set the generated jpg image quality to 70%?
joomla-3.x jimage
add a comment |
I'm using JImage to generate .jpg image thumbnails.
$image = new JImage($image_src);
$resizedImage = $image->cropResize($thumb_width, $thumb_height, true);
$thumb = $resizedImage->toFile(JPATH_BASE.'path/to/photo_thumbnail.jpg', IMAGETYPE_JPEG);
How can I set the generated jpg image quality to 70%?
joomla-3.x jimage
I'm using JImage to generate .jpg image thumbnails.
$image = new JImage($image_src);
$resizedImage = $image->cropResize($thumb_width, $thumb_height, true);
$thumb = $resizedImage->toFile(JPATH_BASE.'path/to/photo_thumbnail.jpg', IMAGETYPE_JPEG);
How can I set the generated jpg image quality to 70%?
joomla-3.x jimage
joomla-3.x jimage
asked 3 hours ago
webchunwebchun
1,790720
1,790720
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The third argument in toFile is the options array, which includes 'quality' as a key. eg.
$thumb = $resizedImage->toFile(JPATH_BASE.'path/to/photo_thumbnail.jpg', IMAGETYPE_JPEG, array('quality' => 70));
API Doc for Image
https://api.joomla.org/cms-3/classes/Joomla.Image.Image.html
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "555"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fjoomla.stackexchange.com%2fquestions%2f24515%2fjimage-set-generated-image-quality%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The third argument in toFile is the options array, which includes 'quality' as a key. eg.
$thumb = $resizedImage->toFile(JPATH_BASE.'path/to/photo_thumbnail.jpg', IMAGETYPE_JPEG, array('quality' => 70));
API Doc for Image
https://api.joomla.org/cms-3/classes/Joomla.Image.Image.html
add a comment |
The third argument in toFile is the options array, which includes 'quality' as a key. eg.
$thumb = $resizedImage->toFile(JPATH_BASE.'path/to/photo_thumbnail.jpg', IMAGETYPE_JPEG, array('quality' => 70));
API Doc for Image
https://api.joomla.org/cms-3/classes/Joomla.Image.Image.html
add a comment |
The third argument in toFile is the options array, which includes 'quality' as a key. eg.
$thumb = $resizedImage->toFile(JPATH_BASE.'path/to/photo_thumbnail.jpg', IMAGETYPE_JPEG, array('quality' => 70));
API Doc for Image
https://api.joomla.org/cms-3/classes/Joomla.Image.Image.html
The third argument in toFile is the options array, which includes 'quality' as a key. eg.
$thumb = $resizedImage->toFile(JPATH_BASE.'path/to/photo_thumbnail.jpg', IMAGETYPE_JPEG, array('quality' => 70));
API Doc for Image
https://api.joomla.org/cms-3/classes/Joomla.Image.Image.html
answered 1 hour ago
jamesgarrettjamesgarrett
2,5191511
2,5191511
add a comment |
add a comment |
Thanks for contributing an answer to Joomla Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fjoomla.stackexchange.com%2fquestions%2f24515%2fjimage-set-generated-image-quality%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown