• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • This community is user driven. Be polite with other users.
    • We recommend purchasing a Chevereto license to participate in this community.
    • Purchase a Community Subscription to get even faster ticket response times.

Resize images by default

Garret

Chevereto Noob
Sorry but i am not spanish(and proud to be italian πŸ˜› ).

So, is it possible resizing images by default if the image has a width bigger for example than 400px, and obviously resize the image in max 400px in width?

Thanks for answers!!!
 
Ok, i just did it. Also i fix a major issue with invalid resize values. Now when you do a bad resize (input, over, etc) you got a fancy page that ask you for a valid value and the image is hosted in the temp dir.

you can try at: http://dev.chevereto.com/

todo: Delete the image from the temp dir if this was right re-uploaded.
 
Rodolfo said:
Ok, i just did it. Also i fix a major issue with invalid resize values.
And so where i can download the new nightly build?


Then i forgot another request: multiple uploads. I mean: the homepage starts with only one upload form but it would be great if the user can choose to get other multiple forms (like 6 for examples).

PS: Rodolfo you are a great guy!!! πŸ˜›
 
Oh yes.. multi-upload is a concurrent suggest. Don't worry, i have that on mind.
 
Rodolfo said:
Oh yes.. multi-upload is a concurrent suggest. Don't worry, i have that on mind.
But if i download the last nightly build on the home page i'll have the last fix you made?
 
Garret said:
Rodolfo said:
Oh yes.. multi-upload is a concurrent suggest. Don't worry, i have that on mind.
But if i download the last nightly build on the home page i'll have the last fix you made?

Sadly no... This just came out. But you can do it by yourself:

add somewhere in config.php
PHP:
$allow_over_resize = false; // true: peremite que se redimensione por sobre el ancho de la imagen - false: no redimensiona sobre el ancho de la imagen

Then in engine.php change this:
PHP:
			if (!empty($resize)) {
				if(preg_match("/[^0-9\.]/",$resize)) { // Queremos solo numeros!
					$errormsg = 'debes introducir solo el valor numerico del ancho deseado';
					$titulo = 'Imagen subida (pero no redimensionada)'.ESP_TITULO;
					$spit = true;
					$red = 2;
				} else {
					if ($resize<=$higres && $resize>=$lowres) {
						$new_alto = round($resize*$alto/$ancho);
						// Seteamos el nuevo alto y ancho
						unset($ancho);
						unset($alto);
						$ancho = $resize;
						$alto = $new_alto;
						$red = 1;
					} else {
						$errormsg = 'el resimensionamiento solo funciona entre los valores 16 y 1280 (pixels)';
						$titulo = 'Imagen subida (pero no redimensionada)'.ESP_TITULO;
						$spit = true;
						$red = 2;
					}
				}
			}

to:
PHP:
            if (!empty($resize)) {                
                if(preg_match("/[^0-9\.]/",$resize)) { // Queremos solo numeros!
                    $errormsg = 'debes introducir solo el valor numerico del ancho deseado';
                    $titulo = 'Imagen subida (pero no redimensionada)'.ESP_TITULO;
                    $spit = true;
                    $red = 2;
                } else {
                    if($allow_over_resize==false && $resize>$ancho) {
                        $errormsg = 'el redimensionamiento no trabaja en valores superiores al ancho de la imagen original ('.$ancho.'px)';
                        $titulo = 'Imagen subida (pero no redimensionada)'.ESP_TITULO;
                        $spit = true;
                        $red = 2;                
                    } else {
                        if ($resize<=$higres && $resize>=$lowres) {
                            $new_alto = round($resize*$alto/$ancho);
                            // Seteamos el nuevo alto y ancho
                            unset($ancho);
                            unset($alto);
                            $ancho = $resize;
                            $alto = $new_alto;
                            $red = 1;
                        } else {
                            $errormsg = 'el resimensionamiento solo funciona entre los valores 16 y 1280 (pixels)';
                            $titulo = 'Imagen subida (pero no redimensionada)'.ESP_TITULO;
                            $spit = true;
                            $red = 2;
                        }
                    }
                }
            }
 
I see in the new nb1.4 you put this mod.
But i am interested in width wich mustn't be bigger than 620px. I don't care about height, because i think imagemagick thinks the rest.
I am totally noob with coding php, so pls you can tell me where to modify?

Thanks a lot!!!

And then i see also the new img sources. But how i can modfy them? Img sources should be images with any word πŸ˜›
 
Garret said:
I see in the new nb1.4 you put this mod.
But i am interested in width wich mustn't be bigger than 620px. I don't care about height, because i think imagemagick thinks the rest.
I am totally noob with coding php, so pls you can tell me where to modify?

Thanks a lot!!!

And then i see also the new img sources. But how i can modfy them? Img sources should be images with any word πŸ˜›

In config.php there is the min and max resize values:
PHP:
$lowres = '16'; // Minimo ancho a redimensionar
$higres = '1280'; // Maximo ancho de redimension

πŸ˜‰
 
About the new img sources, this can be edited with Adobe Fireworks CS3/CS4 (i think with photoshop can't be edited :/)
πŸ™‚
 
gonzalarcon said:
About the new img sources, this can be edited with Adobe Fireworks CS3/CS4 (i think with photoshop can't be edited :/)
πŸ™‚

Yes, they are Fireworks CS4.
 
Rodolfo said:
In config.php there is the min and max resize values:
PHP:
$lowres = '16'; // Minimo ancho a redimensionar
$higres = '1280'; // Maximo ancho de redimension
I have set my config.php like this:
Code:
$lowres = '15'; // Minimo ancho a redimensionar
$higres = '620'; // Maximo ancho de redimension
Then i tried yo upload a picture of 1024x768 and the picture remains as like the original(1024x768).
(Instead i want that the picture must be resized with a 620px width automatically).


Rodolfo said:
gonzalarcon said:
About the new img sources, this can be edited with Adobe Fireworks CS3/CS4 (i think with photoshop can't be edited :/)
πŸ™‚

Yes, they are Fireworks CS4.
Ahhh that's why... because i am under linux and i use gimp. πŸ˜›
 
If you want to force the maximun width of the uploaded images, you must run the resizing if the image is over the max width.
Try to see engine.php and do some πŸ™‚
 
Rodolfo said:
If you want to force the maximun width of the uploaded images, you must run the resizing if the image is over the max width.
Try to see engine.php and do some πŸ™‚
I am totally noob about php coding πŸ˜›
I will wait hoping this feature will be part of chevereto.
Bye πŸ˜€
 
Back
Top