JImage - Set generated image quality Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara 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
What’s with the clanks in Endgame?
std::is_constructible on incomplete types
A Paper Record is What I Hamper
Could Neutrino technically as side-effect, incentivize centralization of the bitcoin network?
Seek and ye shall find
My admission is revoked after accepting the admission offer
The art of proof summarizing. Are there known rules, or is it a purely common sense matter?
What is it called when you ride around on your front wheel?
Check if a string is entirely made of the same substring
Holes in ElementMesh with ToElementMesh of ImplicitRegion
Arriving in Atlanta after US Preclearance in Dublin. Will I go through TSA security in Atlanta to transfer to a connecting flight?
Why did C use the -> operator instead of reusing the . operator?
How would this chord from "Rocket Man" be analyzed?
Can I criticise the more senior developers around me for not writing clean code?
Do I need to protect SFP ports and optics from dust/contaminants? If so, how?
With indentation set to `0em`, when using a line break, there is still an indentation of a size of a space
Additive group of local rings
Why do games have consumables?
Multiple fireplaces in an apartment building?
Why does the Cisco show run command not show the full version, while the show version command does?
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
Can you stand up from being prone using Skirmisher outside of your turn?
What's parked in Mil Moscow helicopter plant?
How to not starve gigantic beasts
JImage - Set generated image quality
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
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 Apr 22 at 5:33
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 2 days 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