Back to project page AndroidImageCache.
The source code is released under:
Przemys?aw Jakubczyk Polidea Sp. z o.o. Copyright (c) 2012 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the follo...
If you think the Android project AndroidImageCache listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package pl.polidea.webimageview; // ww w . j a v a 2 s .c om import android.content.Context; import android.graphics.Bitmap; import android.util.AttributeSet; import java.io.File; import pl.polidea.utils.Dimensions; import pl.polidea.webimageview.processor.BitmapProcessor; import pl.polidea.webimageview.processor.Processor; import pl.polidea.webimageview.processor.ProcessorFactory; /** * @author Przemys?aw Jakubczyk <przemyslaw.jakubczyk@pl.polidea.pl> */ public class DefaultBitmapProcessor implements BitmapProcessor { private final Dimensions dimensions; public DefaultBitmapProcessor(Context context, AttributeSet attributeSet) { this.dimensions = Dimensions.fromAttributesSet(context, attributeSet); } @Override public Bitmap process(final File pathToBitmap) throws BitmapDecodeException { final Bitmaps bitmaps = new Bitmaps(pathToBitmap.getPath()); final Processor processor = determineProcessor(); return processor.processBitmap(bitmaps); } private Processor determineProcessor() { return new ProcessorFactory().createProcessor(dimensions); } }