[] Images transcoding ?
[] Images transcoding ?
Hello,
Sanselan, TwelveMonkeys, Metadata-extractor or FFMpeg can do the job, but i'm not skilled to know which one will use less CPU and less memory for that purpose.
will do the job.
Or this sample of code taken on the Web :
But, if anyone was interested, some more metadatas will need to be extracted to get a more precise, correct renderer's configuration ( CMYK and Progressive attribute write in the supported formats ).
DLNAMediaInfo.java could need some getImageInfo adds like : and ?
Just some ideas that i got when i was reading some posts on this forum
EDIT : On his way..., thank very much to @Valib
https://github.com/UniversalMediaServer ... r/pull/911
https://github.com/UniversalMediaServer ... issues/886
Sanselan, TwelveMonkeys, Metadata-extractor or FFMpeg can do the job, but i'm not skilled to know which one will use less CPU and less memory for that purpose.
Code: Select all
ffmpeg -i input.png -pix_fmt yuvj420p output.jpg
Or this sample of code taken on the Web :
Code: Select all
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
public class Tiff2JpgTest {
public static void main(String args[])
{
try
{
BufferedImage image = ImageIO.read(new File("test.tiff"));
image = convert(image, BufferedImage.TYPE_INT_RGB);
ImageIO.write(image, "jpg", new File("test.jpg"));
System.out.println("done.");
}
catch(Exception e)
{
e.printStackTrace();
}
}
public static BufferedImage convert(BufferedImage src, int bufImgType) {
BufferedImage img= new BufferedImage(src.getWidth(), src.getHeight(), bufImgType);
Graphics2D g2d= img.createGraphics();
g2d.drawImage(src, 0, 0, null);
g2d.dispose();
return img;
}
}
DLNAMediaInfo.java could need some getImageInfo adds like :
Code: Select all
isProgressive()
Code: Select all
getColorType()
Just some ideas that i got when i was reading some posts on this forum

EDIT : On his way..., thank very much to @Valib

https://github.com/UniversalMediaServer ... r/pull/911
https://github.com/UniversalMediaServer ... issues/886