@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } imageAware.setImageDrawable(new RoundedDrawable(bitmap, cornerRadius, margin)); if ((animateFromNetwork && loadedFrom == LoadedFrom.NETWORK) || (animateFromDisk && loadedFrom == LoadedFrom.DISC_CACHE) || (animateFromMemory && loadedFrom == LoadedFrom.MEMORY_CACHE)) { animate(imageAware.getWrappedView(), durationMillis); } }
public l(i i1, k k1, Handler handler) { K = LoadedFrom.NETWORK; z = i1; A = k1; B = handler; C = i1.a; D = C.p; E = C.s; F = C.t; G = C.q; a = k1.a; H = k1.b; b = k1.c; I = k1.d; c = k1.e; d = k1.f; e = k1.g; J = c.a(); }
public void display(Bitmap bitmap, ImageAware imageaware, LoadedFrom loadedfrom) { if (!(imageaware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } Bitmap bitmap1 = Util.clipToRoundBitmap(bitmap); ImageView imageview = (ImageView)imageaware.getWrappedView(); if (bitmap1 == null || imageview == null) { return; } else { imageview.setBackground(new BitmapDrawable(imageview.getResources(), bitmap1)); return; } }
@Override public void display(Bitmap source, ImageAware imageAware, LoadedFrom loadedFrom) { int sourceWidth = source.getWidth(); int sourceHeight = source.getHeight(); Rect target = CropViewExtensions.computeTargetSize(sourceWidth, sourceHeight, viewportWidth, viewportHeight); final Bitmap result = Bitmap.createScaledBitmap( source, target.width(), target.height(), true); if (result != source) { source.recycle(); } imageAware.setImageBitmap(result); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } Bitmap roundedBitmap = roundCorners(bitmap, (ImageViewAware) imageAware, roundPixels); imageAware.setImageBitmap(roundedBitmap); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } imageAware.setImageDrawable(new RoundedDrawable(bitmap, cornerRadius, margin)); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } imageAware.setImageDrawable(new RoundedVignetteDrawable(bitmap, cornerRadius, margin)); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { imageAware.setImageBitmap(bitmap); if ((animateFromNetwork && loadedFrom == LoadedFrom.NETWORK) || (animateFromDisk && loadedFrom == LoadedFrom.DISC_CACHE) || (animateFromMemory && loadedFrom == LoadedFrom.MEMORY_CACHE)) { animate(imageAware.getWrappedView(), durationMillis); } }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } imageAware.setImageDrawable(new CircleDrawable(bitmap, strokeColor, strokeWidth)); }
@Override public void run() { L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey); BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor(); Bitmap processedBitmap = processor.process(bitmap); DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine, LoadedFrom.MEMORY_CACHE); LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine); }
public DisplayBitmapTask(Bitmap bitmap, ImageLoadingInfo imageLoadingInfo, ImageLoaderEngine engine, LoadedFrom loadedFrom) { this.bitmap = bitmap; imageUri = imageLoadingInfo.uri; imageAware = imageLoadingInfo.imageAware; memoryCacheKey = imageLoadingInfo.memoryCacheKey; displayer = imageLoadingInfo.options.getDisplayer(); listener = imageLoadingInfo.listener; this.engine = engine; this.loadedFrom = loadedFrom; }
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (imageAware instanceof ImageViewAware) { imageAware.setImageDrawable(new RoundedDrawable(bitmap, this.cornerRadius, this.margin)); return; } throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); }
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (imageAware instanceof ImageViewAware) { imageAware.setImageDrawable(new RoundedVignetteDrawable(bitmap, this.cornerRadius, this.margin)); return; } throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); }
public DisplayBitmapTask(Bitmap bitmap, ImageLoadingInfo imageLoadingInfo, ImageLoaderEngine engine, LoadedFrom loadedFrom) { this.bitmap = bitmap; this.imageUri = imageLoadingInfo.uri; this.imageAware = imageLoadingInfo.imageAware; this.memoryCacheKey = imageLoadingInfo.memoryCacheKey; this.displayer = imageLoadingInfo.options.getDisplayer(); this.listener = imageLoadingInfo.listener; this.engine = engine; this.loadedFrom = loadedFrom; }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } imageAware.setImageDrawable(getImageDrawable(imageAware,bitmap)); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } imageAware.setImageDrawable(new CircleDrawable(bitmap, margin)); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom, int fileTypeStatus, String filepath) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } Bitmap roundedBitmap = roundCorners(bitmap, (ImageViewAware) imageAware, roundPixels); imageAware.setImageBitmap(roundedBitmap); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom, int fileTypeStatus, String filepath) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } imageAware.setImageDrawable(new RoundedDrawable(bitmap, cornerRadius, margin)); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom, int fileTypeStatus, String filepath) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } imageAware.setImageDrawable(new RoundedVignetteDrawable(bitmap, cornerRadius, margin)); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom, int fileTypeStatus, String filepath) { imageAware.setImageBitmap(bitmap); if ((animateFromNetwork && loadedFrom == LoadedFrom.NETWORK) || (animateFromDisk && loadedFrom == LoadedFrom.DISC_CACHE) || (animateFromMemory && loadedFrom == LoadedFrom.MEMORY_CACHE)) { animate(imageAware.getWrappedView(), durationMillis); } }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom, int fileTypeStatus, String filepath) { if (fileTypeStatus == BitmapDisplayer.FILE_TYPE_GIF_IMAGE && !TextUtils.isEmpty(filepath)) { try { imageAware.setImageDrawable(new GifDrawable(filepath)); } catch (IOException e) { imageAware.setImageBitmap(bitmap); } } else { imageAware.setImageBitmap(bitmap); } }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom, int fileTypeStatus, String filepath) { if (!(imageAware instanceof ImageViewAware)) { throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); } imageAware.setImageDrawable(new CircleDrawable(bitmap, strokeColor, strokeWidth)); }
public DisplayBitmapTask(Bitmap bitmap, ImageLoadingInfo imageLoadingInfo, ImageLoaderEngine engine, LoadedFrom loadedFrom) { this.bitmap = bitmap; imageUri = imageLoadingInfo.uri; imageAware = imageLoadingInfo.imageAware; memoryCacheKey = imageLoadingInfo.memoryCacheKey; displayer = imageLoadingInfo.options.getDisplayer(); listener = imageLoadingInfo.listener; this.engine = engine; this.loadedFrom = loadedFrom; mFileStatusType = imageLoadingInfo.mFileTypeStatus; mFilePath = imageLoadingInfo.mFilePath; }
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (imageAware instanceof ImageViewAware) { imageAware.setImageDrawable(new RoundedDrawable(bitmap, this.cornerRadius, this .margin)); return; } throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); }
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (imageAware instanceof ImageViewAware) { imageAware.setImageDrawable(new RoundedVignetteDrawable(bitmap, this.cornerRadius, this.margin)); return; } throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is " + "expected."); }
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { imageAware.setImageBitmap(bitmap); if ((this.animateFromNetwork && loadedFrom == LoadedFrom.NETWORK) || ((this .animateFromDisk && loadedFrom == LoadedFrom.DISC_CACHE) || (this .animateFromMemory && loadedFrom == LoadedFrom.MEMORY_CACHE))) { animate(imageAware.getWrappedView(), this.durationMillis); } }
public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { if (imageAware instanceof ImageViewAware) { imageAware.setImageDrawable(new CircleDrawable(bitmap, this.strokeColor, this .strokeWidth)); return; } throw new IllegalArgumentException("ImageAware should wrap ImageView. ImageViewAware is expected."); }
public void run() { L.d(LOG_POSTPROCESS_IMAGE, this.imageLoadingInfo.memoryCacheKey); LoadAndDisplayImageTask.runTask(new DisplayBitmapTask(this.imageLoadingInfo.options .getPostProcessor().process(this.bitmap), this.imageLoadingInfo, this.engine, LoadedFrom.MEMORY_CACHE), this.imageLoadingInfo.options.isSyncLoading(), this .handler, this.engine); }
@Override public void display(Bitmap bitmap, ImageAware imageAware, LoadedFrom loadedFrom) { Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_4444); Canvas canvas = new Canvas(output); final int color = 0xff424242; final Paint paint = new Paint(); final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()); paint.setAntiAlias(true); canvas.drawARGB(0, 0, 0, 0); paint.setColor(color); //--CROP THE IMAGE canvas.drawCircle(bitmap.getWidth() / 2, bitmap.getHeight() / 2, bitmap.getWidth() / 2 - 1, paint); paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN)); canvas.drawBitmap(bitmap, rect, rect, paint); //--ADD BORDER IF NEEDED if(this.borderWidth > 0){ final Paint paint2 = new Paint(); paint2.setAntiAlias(true); paint2.setColor(this.borderColor); paint2.setStrokeWidth(this.borderWidth); paint2.setStyle(Paint.Style.STROKE); canvas.drawCircle(bitmap.getWidth() / 2, bitmap.getHeight() / 2, (float) (bitmap.getWidth() / 2 - Math.ceil(this.borderWidth / 2)), paint2); } imageAware.setImageBitmap(output); }