mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-20 14:51:23 +02:00
* Added option to decide if resample or resize when copying images internally. &no-resample
makes resize, instead of resample as is default.
* Verbose now correctly states if transparent color is detected. * Removed that source png-files, containing less than 255 colors, is always saved as palette images since this migth depend on processing of the image.
This commit is contained in:
@@ -558,6 +558,19 @@ verbose("bgColor = $bgColor");
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Do or do not resample image when resizing.
|
||||
*/
|
||||
$resizeStrategy = getDefined(array('no-resample'), true, false);
|
||||
|
||||
if ($resizeStrategy) {
|
||||
$img->setCopyResizeStrategy($img::RESIZE);
|
||||
verbose("Setting = Resize instead of resample");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* fill-to-fit, ff - affecting the resulting image width, height and resize options
|
||||
*/
|
||||
@@ -924,7 +937,7 @@ if ($verbose) {
|
||||
window.getDetails = function (url, id) {
|
||||
$.getJSON(url, function(data) {
|
||||
element = document.getElementById(id);
|
||||
element.innerHTML = "filename: " + data.filename + "\\nmime type: " + data.mimeType + "\\ncolors: " + data.colors + "\\nsize: " + data.size + "\\nwidth: " + data.width + "\\nheigh: " + data.height + "\\naspect-ratio: " + data.aspectRatio;
|
||||
element.innerHTML = "filename: " + data.filename + "\\nmime type: " + data.mimeType + "\\ncolors: " + data.colors + "\\nsize: " + data.size + "\\nwidth: " + data.width + "\\nheigh: " + data.height + "\\naspect-ratio: " + data.aspectRatio + "\\npng-type: " + data.pngType;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user