ea374735e1
Previously, we were always rendering images as squares. Instead of doing that, we now render them as close to true-to-size as possible (within reasonable min/max width/height boundaries).
25 lines
684 B
Java
25 lines
684 B
Java
package org.thoughtcrime.securesms.mms;
|
|
|
|
import android.content.Context;
|
|
import android.net.Uri;
|
|
import android.support.annotation.Nullable;
|
|
|
|
import org.thoughtcrime.securesms.attachments.Attachment;
|
|
import org.thoughtcrime.securesms.util.MediaUtil;
|
|
|
|
public class GifSlide extends ImageSlide {
|
|
|
|
public GifSlide(Context context, Attachment attachment) {
|
|
super(context, attachment);
|
|
}
|
|
|
|
public GifSlide(Context context, Uri uri, long size, int width, int height) {
|
|
super(context, constructAttachmentFromUri(context, uri, MediaUtil.IMAGE_GIF, size, width, height, true, null, false));
|
|
}
|
|
|
|
@Override
|
|
@Nullable
|
|
public Uri getThumbnailUri() {
|
|
return getUri();
|
|
}
|
|
}
|