Update recadrage
This commit is contained in:
parent
71e626c054
commit
a7223aa99b
@ -83,14 +83,20 @@ public class Recadrage {
|
||||
|
||||
|
||||
|
||||
public BufferedImage[] listAutomation(BufferedImage[] list){
|
||||
BufferedImage[] retour=new BufferedImage[list.length];
|
||||
int i=0;
|
||||
for (BufferedImage imag:list)
|
||||
public ArrayList<BufferedImage> listAutomation(ArrayList<BufferedImage>list){
|
||||
ArrayList<BufferedImage> retour =new ArrayList<BufferedImage>();
|
||||
|
||||
for (BufferedImage imag:list) {
|
||||
this.img=imag;
|
||||
try {
|
||||
this.automation();
|
||||
retour[i]=this.img;
|
||||
i++;
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
retour.add(this.img);
|
||||
}
|
||||
return retour;
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,6 +17,8 @@ import org.apache.pdfbox.pdmodel.PDPage;
|
||||
import org.apache.pdfbox.rendering.ImageType;
|
||||
import org.apache.pdfbox.rendering.PDFRenderer;
|
||||
|
||||
import lecturePdf.Recadrage;
|
||||
|
||||
public class PdfToImage {
|
||||
|
||||
public List<String> listAllFiles(String directory, String extension) {
|
||||
@ -31,6 +33,7 @@ public class PdfToImage {
|
||||
return files;
|
||||
}
|
||||
|
||||
|
||||
public BufferedImage blackWhiteConvert(BufferedImage image) {
|
||||
// Convertit une image en image en noir et blanc
|
||||
// TODO : voir recursivite
|
||||
@ -86,7 +89,10 @@ public class PdfToImage {
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
return images;
|
||||
Recadrage recadrage=new Recadrage();
|
||||
return recadrage.listAutomation(images);
|
||||
//return images;
|
||||
|
||||
}
|
||||
|
||||
public void saveOnDisk(List<BufferedImage> images, String originalFileDir) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user