zetbaitsu / Compressor

An android image compression library.
7.08k stars 963 forks source link

The compressed file are not saved in any directory for later viewing #13

Closed Sagaragrawal closed 7 years ago

charleston10 commented 8 years ago
public static File compressImageFile(Context context, File file, int width, int height, int quality) {
        File compressed = new Compressor.Builder(context)
                .setMaxWidth(width)
                .setMaxHeight(height)
                .setQuality(quality)
                .setCompressFormat(Bitmap.CompressFormat.JPEG)
                .setDestinationDirectoryPath(context.getFilesDir().getAbsolutePath())
                .build()
                .compressToFile(file);

        return compressed;
    }

Or save in public directory .setDestinationDirectoryPath(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath())

Sagaragrawal commented 8 years ago

custom compression files save but the normal comprssion files are not saved it tell me that the file is saved in data/0/id.zelort... cache:compressor/filename.

zetbaitsu commented 8 years ago

its saved at apps cached folder, you can't access it directly with file manager. If you need to access it use custom compression with your own destination directory..