标签: android-image

如何使用通用图像加载器

我有我需要加载的缩略图的要求和TextListView其被通过自定义设置Adapter.缩略图应存放在缓存中,供我使用的通用图像装载机不过我在它的实现非常困惑,以及如何在使用它按我的要求来加载图像ListViewURL.请通过良好的实施建议我一些方法.

android android-image android-listview android-adapter

12
推荐指数
3
解决办法
4万
查看次数

如何更改ic_launcher_round.png文件夹内容?

我在更改Android应用程序的图标时遇到了困难.我遵循了指示:

1.Right click on the project
2.Select New -> Image Asset
3.Select 'Asset Type' as Image
4.Select Path of and .png image
5.Optional: padding, trimming etc.
6.Next and Finish
Run Code Online (Sandbox Code Playgroud)

这改变了minmap/ic_launcher.png内容中的图标,但是,这不会更改minmap/ic_launcher_round.png文件夹内容.这样,如果Android系统配置为显示圆形图标,则此文件夹中显示的图标:minmap/ic_launcher_round.png.但我找不到改变该特定文件夹内容的方法.

我试图在Path中选择一个圆形图像,但stil不起作用.

如果我将我的Android手机设置为显示应用程序启动器图标为方形,我会看到所需的图标,但是,如果它被更改为圆形,则我看不到我想要的图标.

请指导如何更改圆形ic_launchers.

谢谢

android android-image android-icons android-drawable

12
推荐指数
2
解决办法
8746
查看次数

在android中将位图转换为sepia

有没有办法将Bitmap转换为棕褐色?我知道转换为grayScale是在ColorMatrix中设置setSaturation.但是棕褐色呢?

android android-image

11
推荐指数
2
解决办法
8547
查看次数

Android:我应该使用哪种图像格式?为什么?

我是一个初学者程序员,我的问题是:我的Android应用程序将使用哪种图像格式?

Descripton:我只使用插图,因此图像主要是背景图像和一些按钮,我想知道哪种方法最好.

我目前的图像进展是下一个:我使用.png文件格式.我不知道我应该使用什么分辨率,现在我使用300x400 px图像aproximetly.

这是我使用图像的代码:

Bitmap bMap = BitmapFactory.decodeResource(getResources(), MyArray[index].getArtiD());

MyImageView.setImageBitmap(bMap);

所以这就是我在Android中使用图像的方式,如果有人知道问题,提示或"必须知道的信息",请告诉我们这样做.我真的不明白为什么我应该使用这个位图工厂或为什么我应该使用png格式.我想以最好的方式做到这一点,我在Android文档中看不到很多东西.

谢谢,亚当

android android-image bitmapfactory

11
推荐指数
1
解决办法
2万
查看次数

如何在非相机应用程序中使用Android Camera API?

我想在非Camera应用程序中使用一些Android 4 API.

API包括一些非常好的人脸检测类,包括Camera.Face自API 14以来可用的类.我想应用相同的人脸检测类,以便对保存在设备上的图像实现人脸检测.我更喜欢使用它来处理存储在设备上的图片(例如:社交标记,面部图像处理等)

我需要有关如何完成此重用任务的指导.

camera android image face-detection android-image

11
推荐指数
2
解决办法
1267
查看次数

如何在位图上应用不同的图像效果(滤镜),如棕褐色,黑白,模糊等?

我不知道如何对图像应用不同的效果,

我在效果类中看到了EffectFactory类和Effect类有一个方法适用 但我不确定在inputTexId和optputTexId中传递什么,并且我从哪里得到新的更新图像,如何在imageView中存储更新的图像,

请帮我解决这个问题.是否有任何开源库可用于为Image提供效果.

谢谢,

android image-processing image-editing android-image

11
推荐指数
2
解决办法
3万
查看次数

如何合并图像并相互施加

假设我上传了两张或两张以上的照片Framelayout.因此,我在这三张照片的三个不同位置上传了三个与同一个人的照片.然后,可以使用Android或Java或Native中的哪些图像处理库来执行某些操作,如图中所示.

我想互相拍多张照片.

这样的东西: -

图片与分层设施

一个想法是:

  1. 在所有这些图片中进行一些分层,并在图片中找到不匹配的区域并合并它们.

如何将多张图片与其他图片合并?通过检查di-similarity并相互合并?

是否有任何第三方Api或一些Photoshop服务可以帮助我进行这些图像处理?

android image-processing android-image

11
推荐指数
1
解决办法
3467
查看次数

如何将图像上传到Firebase存储?

我正在尝试将一个简单的字节数组上传到Firebase存储中,但是我onFailureListener不断被调用并记录回来,说上传失败了.我希望你们能告诉我我的代码有什么问题.

在顶部,我得到了

 //Firebase
    private Firebase mRef;
    private StorageReference storageRef;
Run Code Online (Sandbox Code Playgroud)

然后进去 onStart()

@Override
protected void onStart() {
    super.onStart();
    googleApiClient.connect();
    //Firebase
    mRef = new Firebase("link to firebase account");
    FirebaseStorage storage = FirebaseStorage.getInstance();
    storageRef = storage.getReferenceFromUrl("link to storage");

}
Run Code Online (Sandbox Code Playgroud)

然后在我的 onActivityResult()

      @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) {
            addImageImageView.setVisibility(View.GONE);
            if (requestCode == Constants.REQUEST_CODE && resultCode == RESULT_OK && data != null) {
                //First we gotta make sure to add the images to
                ArrayList<Image> imagesFromGallery = data.getParcelableArrayListExtra(Constants.INTENT_EXTRA_IMAGES);
                for (int …
Run Code Online (Sandbox Code Playgroud)

android android-image firebase firebase-realtime-database firebase-storage

11
推荐指数
2
解决办法
3万
查看次数

如何将html内容中的内嵌图像保存/读取到内部/外部内存

根据这个问题,我使用了一个自定义ImageGatter类来显示我使用Picasso从TextView中的服务器获取的图像

    public class PicassoImageGetter implements Html.ImageGetter {

    private TextView textView = null;
    Context mContext;

    public PicassoImageGetter() {

    }

    public PicassoImageGetter(TextView target, Context context) {
        textView = target;
        mContext = context;
    }

    @Override
    public Drawable getDrawable(String source) {

        BitmapDrawablePlaceHolder drawable = new BitmapDrawablePlaceHolder();
        Picasso.get().load(source).into(drawable);
        return drawable;

    }

    private class BitmapDrawablePlaceHolder extends BitmapDrawable implements com.squareup.picasso.Target {

        protected Drawable drawable;

        @Override
        public void draw(final Canvas canvas) {
            if (drawable != null) {
                drawable.draw(canvas);
            }
        }

        public void setDrawable(Drawable drawable) {
            this.drawable …
Run Code Online (Sandbox Code Playgroud)

android android-image picasso android-bitmap android-internal-storage

11
推荐指数
1
解决办法
218
查看次数

Android - 如何从资源中显示图像?

我无法显示保存在res/drawable文件夹中的图像.我使用ImageGetter来做到这一点.代码如下:

ImageGetter imageGetter3 = new ImageGetter() {                
    public Drawable getDrawable(String source) { 
        int id=0; 
        if (source.equals("smiley")) { 
            id = R.drawable.smiley; 
        } 
        Drawable d = getResources().getDrawable(id); 
        d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight()); 
        return d; 
    } 
};

directions += "Je bent bij lokaal " + vertrek.getNaam() + "\n" 
           + "Sta met je rug voor de deur\n" 
           + Html.fromHtml("<img src=\"smiley\">", imageGetter3, null) + " Draai naar links\n";
Run Code Online (Sandbox Code Playgroud)

我在跑步时在屏幕上看到的是一个带有"obj"文字的小方块.那有什么不对?无法读取图像或其他内容?如何显示图片?

老实说,我用Google搜索了很多,并试图ImageGetter的其他方法为好,但他们都不似乎工作,我想这太,他们不工作:

ImageGetter imageGetter2 = new ImageGetter() { 
 public Drawable getDrawable(String source) { 
      Drawable d = null; 
      d …
Run Code Online (Sandbox Code Playgroud)

android android-image android-webview android-imageview

10
推荐指数
2
解决办法
7万
查看次数