Este how-to mostra como redimensioar uma imagem usando Java e Marvin.

Primeiramente, faça um static import da classe MarvinPluginCollection para ter acesso a seus métodos estáticos.

import static marvin.MarvinPluginCollection.*;

Use o método scale(...) para redimensionar imagens.

MarvinImage image = MarvinImageIO.loadImage("myimage.jpg");
scale(image.clone(), image, 500, 400); // 500 and 400 are the new width and height.
MarvinImageIO.saveImage(image, "myimage_scaled.jpg");

Was this how-to helpful? Share it:

Do not you know how to setup Marvin? Read how to develop your First Application.