Posts

Showing posts with the label Imagic Magick

How to convert image DPI in java code with image magick

public int convertDPI(String inputImage, String outputImage, String density) {         int returnCode = 0;         Process process;         try {             String[] command = { "convert", "-density", density, inputImage, outputImage };             process = Runtime.getRuntime().exec(command);             returnCode = process.waitFor();         } catch (IOException e) {             e.printStackTrace();         } catch (InterruptedException e) {             e.printStackTrace();         }         return returnCode;     }

How to make thumbnails in jpg format of Videos in Java code examples

Make  thumbnails in jpg format of  Videos : - Point to Note:- There is need to install ffmpeg in your system. public int compressVideioToJpg(String inputVideo, String outputJpg) {     int returnCode = 0;     Process process;     try {         System.out.println("compressVideioToJpg called");         System.out.println("inputVideo:"+inputVideo);         System.out.println("outputVidio:"+outputJpg);         String[] command = { "ffmpeg", "-i", inputVideo , "-an", "-r", ".1", "-y","-s","236x148", outputJpg};         System.out.println("22:");         process = Runtime.getRuntime().exec(command);         System.out.println("after process JPG");         returnCode = proce...

How to convert Video to FLV for Flv Player ? : java code , Examples

How to convert Video to FLV for Flv Player public int compressVideioFLV(String inputVideo, String outputVidio) {         int returnCode = 0;         Process process;         try {             System.out.println("compressVideioFLV called");             System.out.println("inputVideo:"+inputVideo);             System.out.println("outputVidio:"+outputVidio);             String[] command = { "ffmpeg", "-i", inputVideo , "-ar", "22050", "-ab", "32","-f","flv","-s","422x252", outputVidio};             System.out.println("11:");             process = Runtime.getRuntime().exec(command);   ...

How to make thumbnail of any image in java : code, Examples ?

 /* This code need to configure image magik tool for Image Processing */   /* This code is completable for all windows and Linux operating system */ public int thumbImageMaker(String inputImage, String outputImage, int width, int height) {         int returnCode = 0;         Process process;         try {             String[] command = { "convert", "-thumbnail", width+"x"+height, inputImage, outputImage };             process = Runtime.getRuntime().exec(command);             returnCode = process.waitFor();         } catch (IOException e) {             e.printStackTrace();         } catch (InterruptedException e) {     ...

Recent Post

Recent Posts Widget