php - Edges appear in image after resizing -


I have implemented the following function:

  generate a private static function image ($ SizeKey, $ Src, $ initial with $ $ starting, $ imageType) {$ Destination = AdImage :: addSizeKey ($ sizeKey, $ src); If (file_exists ($ destination)) {return; } $ FinalSize = AdImage :: $ size [$ sizeKey]; $ Initial Season = $ Initial Fourth / $ Beginning Hight; $ Last night = $ last size ["w"] / $ last size ["h"]; $ NewImage = imagecreatetruecolor ($ last shape ["w"], $ last size ["h"]); Imagealphobalending (new image, wrong); Image swords ($ new image, true); $ Old image = image frame framestring (file_gate_content ($ src)); If ($ Initial Arteo & gt; = $ last night) {$ scale = $ finalSize ["h"] / $ initialHyight; $ Surpluss = abs (initial with - $ initialhete * $ lastnight)); Imagecopyresized ($ new image, $ old image, 0, 0, $ extra / 2, 0, $ lastize ["w"], $ last size ["h"], initial quartet - $ overwriting, initiallight); } And {$ scale = $ finalSize ["w"] / $ initial with; $ Surpluss = abs ($ earlyhit - (initial with / $ last retro)); Imagecopyresized ($ new image, $ old image, 0, 0, 0, $ extra / 2, $ last shape ["w"], $ last size ["h"], $ starting quarter, $ preliminary hect - $ surplus); } Switch ($ imageType) {case IMAGETYPE_JPEG: {imagejpeg ($ newImage, $ destination, 100); break; } Case IMAGETYPE_PNG: {imagepng ($ new image, $ destination); break; } Case IMAGETYPE_GIF: {imagesgif ($ newImage, $ destination); break; } Default: {imagejpeg ($ newImage, $ destination, 100); break; Although} the edges are visible, the lines are not straight, even if they were originally straightforward, I believe that I have the problem with the high pass filter, Can solve a combination of low-pass filter and salt; Piper filter, but I'm not sure how I apply it to PGG, JPEG and GIF. I'll start by studying what the pattern of these files is and apply the filter separately. I am surprised that there is a better solution. 

I did not need image processing. I was using the wrong function.

/ Pre>

and the quality of the images has improved.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -