Do not resize image [closed]

1

I am sending to my server via php script an image with original size of 1000px wide by 350px in height but the same is being resized to 800px wide by 280px in height and I would like it to remain in the original size

I use the WideImage class and my code looks like this:

    $arquivo_destino =  $dir_destino . "/" . $nome_arquivo;
copy($arquivo_origem, $arquivo_destino);

// Vamos usar a biblioteca WideImage para o redimensionamento das imagens
require("../lib/WideImage/WideImage.php");

// INSERE A MARCA D'ÁGUA NA FOTO
// $image = WideImage::load($arquivo_destino);
// $marca = WideImage::load("../imagens/logo-marcadagua.png");

//$image->merge($marca, 'right', 'bottom')->saveToFile($arquivo_destino); 

// Carrega a imagem enviada
$original = WideImage::load($arquivo_destino);

// Redimensiona a imagem original para tamanho miniatura
$arquivo_destino = $dir_destino . "/thumb/" . $nome_thumb;
$original->resize(175, 125, 'inside', 'down')->saveToFile($arquivo_destino);
// Redimensiona e salva

For resizing the thumbs, the script works perfectly.

    
asked by anonymous 09.06.2014 / 16:03

1 answer

2

The code is ok, the image is being resized before it even reaches the server, using this command you will see what is being sent to the server and thus work around the problem:

var_dump(getimagesize($arquivo_destino)); die;
    
09.06.2014 / 20:16
___ ___ erkimt Installing ImageMagick on windows 7 [32-bit]? ______ qstntxt ___
How do I install and configure %code% on windows 7 32bit , and how do I put the commands in it?

In my case, I need to put the command:

%pre%     
______ azszpr20688 ___

For Windows 7, 32 Bit, use the following installation:

ImageMagick for Windows 32 Bit

Install normally with the default options.

After installing, go to the Windows console (cmd).

Type the following command and see if you have the same return as the image below.

%pre%

Iftheabovecommandworks,thenfollowthesesteps:

Step1:Createafolderandplacethefilestoresizewithinit.NotethatinmycasethereareseveralBMPfiles.

Step2 : Create a folder within the current folder. This folder will receive the resized files. I gave the small name, as shown below.

Step3:Runthecommandmogrify-pathsmall-resize50%*.bmp

Noteintheimagebelowthesizeofthefilesbeforetheconversion.Alsonoticethecommandlineabove.

Step4 : Confirmation of the result. Enter the small folder, run a dir and see how the file size has changed.

    
___ Return in Pagination View from Array in Laravel / Paginate :: make ()