Android在ImageView上直接显示网络图片

article/2025/9/24 8:55:18

在原生的ImageView中,没有一个方法是可以直接显示网络的图片的,当我们经常需要显示网络图片时,每次都有一大堆的操作,这会很麻烦,今天就教大家在ImageView上轻松显示网络图片。

自定义ImageView方法

写一个类让它继承ImageView,并增加一个setImageURL(path)方法

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Handler;
import android.os.Message;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.Toast;import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;public class MyImageView extends ImageView {public static final int GET_DATA_SUCCESS = 1;public static final int NETWORK_ERROR = 2;public static final int SERVER_ERROR = 3;//子线程不能操作UI,通过Handler设置图片private Handler handler = new Handler() {@Overridepublic void handleMessage(Message msg) {switch (msg.what){case GET_DATA_SUCCESS:Bitmap bitmap = (Bitmap) msg.obj;setImageBitmap(bitmap);break;case NETWORK_ERROR:Toast.makeText(getContext(),"网络连接失败",Toast.LENGTH_SHORT).show();break;case SERVER_ERROR:Toast.makeText(getContext(),"服务器发生错误",Toast.LENGTH_SHORT).show();break;}}};public MyImageView(Context context, AttributeSet attrs, int defStyleAttr) {super(context, attrs, defStyleAttr);}public MyImageView(Context context) {super(context);}public MyImageView(Context context, AttributeSet attrs) {super(context, attrs);}//设置网络图片public void setImageURL(final String path) {//开启一个线程用于联网new Thread() {@Overridepublic void run() {try {//把传过来的路径转成URLURL url = new URL(path);//获取连接HttpURLConnection connection = (HttpURLConnection) url.openConnection();//使用GET方法访问网络connection.setRequestMethod("GET");//超时时间为10秒connection.setConnectTimeout(10000);//获取返回码int code = connection.getResponseCode();if (code == 200) {InputStream inputStream = connection.getInputStream();//使用工厂把网络的输入流生产BitmapBitmap bitmap = BitmapFactory.decodeStream(inputStream);//利用Message把图片发给HandlerMessage msg = Message.obtain();msg.obj = bitmap;msg.what = GET_DATA_SUCCESS;handler.sendMessage(msg);inputStream.close();}else {//服务启发生错误handler.sendEmptyMessage(SERVER_ERROR);}} catch (IOException e) {e.printStackTrace();//网络连接错误handler.sendEmptyMessage(NETWORK_ERROR);}}}.start();}}

在布局上不能使用ImageView,要使用MyImageView,要把刚才重写的一个MyImageView的全路径写上

<Buttonandroid:text="加载网络图片"android:layout_width="match_parent"android:layout_height="wrap_content"android:id="@+id/button" /><com.example.dell.myapplication.MyImageViewandroid:id="@+id/image_view"android:layout_width="match_parent"android:layout_height="match_parent" />

在MainActivity上,只要调用setImageURL(),直接把网络的图片路径写上就可以显示网络的图片了

final MyImageView myImageView = (MyImageView) findViewById(R.id.image_view);Button button = (Button) findViewById(R.id.button);button.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {//直接把网络的图片路径写上就可以显示网络的图片了myImageView.setImageURL("https://pic.cnblogs.com/avatar/1142647/20170416093225.png");}});

最后别忘了添加访问网络的权限

<uses-permission android:name="android.permission.INTERNET"/>

效果图

压缩

       这是比较简单的从网络获取照片,直接在ImageView上显示,但是你有没有考虑过如果网络的图片很大,已经超出了手机屏幕的大小,如果还是加载原图的话无疑是浪费内存,还有可能造成内存溢出,所以我们有必要对网络的图片进行压缩,下面就开始讲网络图片的压缩。

首先获取ImageView要显示的宽度和高度

    /*** 获取ImageView实际的宽度* @return 返回ImageView实际的宽度*/public int realImageViewWith() {DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();ViewGroup.LayoutParams layoutParams = getLayoutParams();//如果ImageView设置了宽度就可以获取实在宽带int width = getWidth();if (width <= 0) {//如果ImageView没有设置宽度,就获取父级容器的宽度width = layoutParams.width;}if (width <= 0) {//获取ImageView宽度的最大值width = getMaxWidth();}if (width <= 0) {//获取屏幕的宽度width = displayMetrics.widthPixels;}Log.e("ImageView实际的宽度", String.valueOf(width));return width;}/*** 获取ImageView实际的高度* @return 返回ImageView实际的高度*/public int realImageViewHeight() {DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();ViewGroup.LayoutParams layoutParams = getLayoutParams();//如果ImageView设置了高度就可以获取实在宽度int height = getHeight();if (height <= 0) {//如果ImageView没有设置高度,就获取父级容器的高度height = layoutParams.height;}if (height <= 0) {//获取ImageView高度的最大值height = getMaxHeight();}if (height <= 0) {//获取ImageView高度的最大值height = displayMetrics.heightPixels;}Log.e("ImageView实际的高度", String.valueOf(height));return height;}

然后是通过网络图片的大小计算要压缩的比率

    /*** 获得需要压缩的比率** @param options 需要传入已经BitmapFactory.decodeStream(is, null, options);* @return 返回压缩的比率,最小为1*/public int getInSampleSize(BitmapFactory.Options options) {int inSampleSize = 1;int realWith = realImageViewWith();int realHeight = realImageViewHeight();int outWidth = options.outWidth;Log.e("网络图片实际的宽度", String.valueOf(outWidth));int outHeight = options.outHeight;Log.e("网络图片实际的高度", String.valueOf(outHeight));//获取比率最大的那个if (outWidth > realWith || outHeight > realHeight) {int withRadio = Math.round(outWidth / realWith);int heightRadio = Math.round(outHeight / realHeight);inSampleSize = withRadio > heightRadio ? withRadio : heightRadio;}Log.e("压缩比率", String.valueOf(inSampleSize));return inSampleSize;}

获得压缩比率后,就可以进行压缩了

    /*** 根据输入流返回一个压缩的图片* @param input 图片的输入流* @return 压缩的图片*/public Bitmap getCompressBitmap(InputStream input) {//因为InputStream要使用两次,但是使用一次就无效了,所以需要复制两个ByteArrayOutputStream baos = new ByteArrayOutputStream();try {byte[] buffer = new byte[1024];int len;while ((len = input.read(buffer)) > -1 ) {baos.write(buffer, 0, len);}baos.flush();} catch (IOException e) {e.printStackTrace();}//复制新的输入流InputStream is = new ByteArrayInputStream(baos.toByteArray());InputStream is2 = new ByteArrayInputStream(baos.toByteArray());//只是获取网络图片的大小,并没有真正获取图片BitmapFactory.Options options = new BitmapFactory.Options();options.inJustDecodeBounds = true;BitmapFactory.decodeStream(is, null, options);//获取图片并进行压缩options.inSampleSize = getInSampleSize(options);options.inJustDecodeBounds = false;return BitmapFactory.decodeStream(is2, null, options);}

最后就是在setImageURL()的方法中把 Bitmap bitmap = BitmapFactory.decodeStream(inputStream); 改成下面的方法

Bitmap bitmap = getCompressBitmap(inputStream);

缓存

有时候提高运行效率和节省流量,经常会使用的缓存,数据缓存后就算没有网络都可以使用,下面就开始学习缓存吧,我这种缓存不是正规的缓存技术。

将setImageURL()方法改成如下,并增加两全局变量imagePath、isUseCache;

    //是否启用缓存public boolean isUseCache = false;private String imagePath;//设置网络图片public void setImageURL(String path) {imagePath = path;if (isUseCache){useCacheImage();}else {useNetWorkImage();}}

把之前setImageURL()的大部分功能放到useNetWorkImage()方法中,增加一个判断:是否缓存图片

    //使用网络图片显示public void useNetWorkImage(){//开启一个线程用于联网new Thread() {@Overridepublic void run() {try {//把传过来的路径转成URLURL url = new URL(imagePath);//获取连接HttpURLConnection connection = (HttpURLConnection) url.openConnection();//使用GET方法访问网络connection.setRequestMethod("GET");//超时时间为10秒connection.setConnectTimeout(10000);//获取返回码int code = connection.getResponseCode();if (code == 200) {Bitmap bitmap;//获取网络输入流InputStream inputStream = connection.getInputStream();//判断是否使用缓存图片if (isUseCache){//因为InputStream要使用两次,但是使用一次就无效了,所以需要复制两个ByteArrayOutputStream baos = new ByteArrayOutputStream();try {byte[] buffer = new byte[1024];int len;while ((len = inputStream.read(buffer)) > -1) {baos.write(buffer, 0, len);}baos.flush();} catch (IOException e) {e.printStackTrace();}//复制新的输入流InputStream is = new ByteArrayInputStream(baos.toByteArray());InputStream is2 = new ByteArrayInputStream(baos.toByteArray());//调用压缩方法显示图片bitmap = getCompressBitmap(is);//调用缓存图片方法cacheImage(is2);}else {//调用压缩方法bitmap = getCompressBitmap(inputStream);}//利用Message把图片发给HandlerMessage msg = Message.obtain();msg.obj = bitmap;msg.what = GET_DATA_SUCCESS;handler.sendMessage(msg);inputStream.close();} else {//服务启发生错误handler.sendEmptyMessage(SERVER_ERROR);}} catch (IOException e) {e.printStackTrace();//网络连接错误handler.sendEmptyMessage(NETWORK_ERROR);}}}.start();}

 创建一个方法用于根据传了的网址生成一个独一无二文件,之后会根据这个路径生成图片和查找是否有缓存图片

    /*** 根据网址生成一个文件名* @return 文件名*/public String getURLPath() {StringBuilder urlStr2 = new StringBuilder();String[] strings = imagePath.split("\\/");for (String string : strings) {urlStr2.append(string);}Log.e("MyImageView","文件名:"+urlStr2.toString());return urlStr2.toString();}

根据生成的路径缓存图片

    /*** 缓存网络的图片* @param inputStream 网络的输入流*/public void cacheImage(InputStream inputStream) {try {File file = new File(getContext().getCacheDir(), getURLPath());FileOutputStream fos = new FileOutputStream(file);int len;byte[] buffer = new byte[1024];while ((len = inputStream.read(buffer)) != -1) {fos.write(buffer, 0, len);}fos.close();Log.e("MyImageView","缓存成功");} catch (IOException e) {e.printStackTrace();Log.e("MyImageView","缓存失败");}}

最后就可以直接使用缓存图片了

    //使用缓存图片public void useCacheImage() {//创建路径一样的文件File file = new File(getContext().getCacheDir(), getURLPath());//判断文件是否存在if (file != null && file.length() > 0) {//使用本地图片try {InputStream inputStream = new FileInputStream(file);//调用压缩方法显示图片Bitmap bitmap = getCompressBitmap(inputStream);//利用Message把图片发给HandlerMessage msg = Message.obtain();msg.obj = bitmap;msg.what = GET_DATA_SUCCESS;handler.sendMessage(msg);Log.e("MyImageView","使用缓存图片");} catch (FileNotFoundException e) {e.printStackTrace();}}else {//使用网络图片useNetWorkImage();Log.e("MyImageView","使用网络图片");}}

现在就可以使用缓存了,记得要吧isUseCache设置成true

        //直接把网络的图片路径写上就可以显示网络的图片了String url = "https://pic.cnblogs.com/avatar/1142647/20170416093225.png";//设置成true才会启动缓存,默认是falsemyImageView.isUseCache = true;myImageView.setImageURL(url); 

整篇MyImageView.java的代码

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Handler;
import android.os.Message;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.Toast;import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;public class MyImageView extends ImageView {private String imagePath;//是否启用缓存public boolean isUseCache = false;public static final int GET_DATA_SUCCESS = 1;public static final int NETWORK_ERROR = 2;public static final int SERVER_ERROR = 3;//子线程不能操作UI,通过Handler设置图片private Handler handler = new Handler() {@Overridepublic void handleMessage(Message msg) {switch (msg.what) {case GET_DATA_SUCCESS:Bitmap bitmap = (Bitmap) msg.obj;setImageBitmap(bitmap);break;case NETWORK_ERROR:Toast.makeText(getContext(), "网络连接失败", Toast.LENGTH_SHORT).show();break;case SERVER_ERROR:Toast.makeText(getContext(), "服务器发生错误", Toast.LENGTH_SHORT).show();break;}}};public MyImageView(Context context, AttributeSet attrs, int defStyleAttr) {super(context, attrs, defStyleAttr);}public MyImageView(Context context) {super(context);}public MyImageView(Context context, AttributeSet attrs) {super(context, attrs);}//设置网络图片public void setImageURL(String path) {imagePath = path;if (isUseCache){useCacheImage();}else {useNetWorkImage();}}//使用网络图片显示public void useNetWorkImage(){//开启一个线程用于联网new Thread() {@Overridepublic void run() {try {//把传过来的路径转成URLURL url = new URL(imagePath);//获取连接HttpURLConnection connection = (HttpURLConnection) url.openConnection();//使用GET方法访问网络connection.setRequestMethod("GET");//超时时间为10秒connection.setConnectTimeout(10000);//获取返回码int code = connection.getResponseCode();if (code == 200) {Bitmap bitmap;//获取网络输入流InputStream inputStream = connection.getInputStream();//判断是否使用缓存图片if (isUseCache){//因为InputStream要使用两次,但是使用一次就无效了,所以需要复制两个ByteArrayOutputStream baos = new ByteArrayOutputStream();try {byte[] buffer = new byte[1024];int len;while ((len = inputStream.read(buffer)) > -1) {baos.write(buffer, 0, len);}baos.flush();} catch (IOException e) {e.printStackTrace();}//复制新的输入流InputStream is = new ByteArrayInputStream(baos.toByteArray());InputStream is2 = new ByteArrayInputStream(baos.toByteArray());//调用压缩方法显示图片bitmap = getCompressBitmap(is);//调用缓存图片方法cacheImage(is2);}else {//调用压缩方法bitmap = getCompressBitmap(inputStream);}//利用Message把图片发给HandlerMessage msg = Message.obtain();msg.obj = bitmap;msg.what = GET_DATA_SUCCESS;handler.sendMessage(msg);inputStream.close();} else {//服务启发生错误handler.sendEmptyMessage(SERVER_ERROR);}} catch (IOException e) {e.printStackTrace();//网络连接错误handler.sendEmptyMessage(NETWORK_ERROR);}}}.start();}//使用缓存图片public void useCacheImage() {//创建路径一样的文件File file = new File(getContext().getCacheDir(), getURLPath());//判断文件是否存在if (file != null && file.length() > 0) {//使用本地图片try {InputStream inputStream = new FileInputStream(file);//调用压缩方法显示图片Bitmap bitmap = getCompressBitmap(inputStream);//利用Message把图片发给HandlerMessage msg = Message.obtain();msg.obj = bitmap;msg.what = GET_DATA_SUCCESS;handler.sendMessage(msg);Log.e("MyImageView","使用缓存图片");} catch (FileNotFoundException e) {e.printStackTrace();}}else {//使用网络图片useNetWorkImage();Log.e("MyImageView","使用网络图片");}}/*** 缓存网络的图片* @param inputStream 网络的输入流*/public void cacheImage(InputStream inputStream) {try {File file = new File(getContext().getCacheDir(), getURLPath());FileOutputStream fos = new FileOutputStream(file);int len;byte[] buffer = new byte[1024];while ((len = inputStream.read(buffer)) != -1) {fos.write(buffer, 0, len);}fos.close();Log.e("MyImageView","缓存成功");} catch (IOException e) {e.printStackTrace();Log.e("MyImageView","缓存失败");}}/*** 根据网址生成一个文件名* @return 文件名*/public String getURLPath() {StringBuilder urlStr2 = new StringBuilder();String[] strings = imagePath.split("\\/");for (String string : strings) {urlStr2.append(string);}Log.e("MyImageView","文件名:"+urlStr2.toString());return urlStr2.toString();}/*** 根据输入流返回一个压缩的图片** @param input 图片的输入流* @return 压缩的图片*/public Bitmap getCompressBitmap(InputStream input) {//因为InputStream要使用两次,但是使用一次就无效了,所以需要复制两个ByteArrayOutputStream baos = new ByteArrayOutputStream();try {byte[] buffer = new byte[1024];int len;while ((len = input.read(buffer)) > -1) {baos.write(buffer, 0, len);}baos.flush();} catch (IOException e) {e.printStackTrace();}//复制新的输入流InputStream is = new ByteArrayInputStream(baos.toByteArray());InputStream is2 = new ByteArrayInputStream(baos.toByteArray());//只是获取网络图片的大小,并没有真正获取图片BitmapFactory.Options options = new BitmapFactory.Options();options.inJustDecodeBounds = true;BitmapFactory.decodeStream(is, null, options);//获取图片并进行压缩options.inSampleSize = getInSampleSize(options);options.inJustDecodeBounds = false;return BitmapFactory.decodeStream(is2, null, options);}/*** 获得需要压缩的比率** @param options 需要传入已经BitmapFactory.decodeStream(is, null, options);* @return 返回压缩的比率,最小为1*/public int getInSampleSize(BitmapFactory.Options options) {int inSampleSize = 1;int realWith = realImageViewWith();int realHeight = realImageViewHeight();int outWidth = options.outWidth;Log.e("网络图片实际的宽度", String.valueOf(outWidth));int outHeight = options.outHeight;Log.e("网络图片实际的高度", String.valueOf(outHeight));//获取比率最大的那个if (outWidth > realWith || outHeight > realHeight) {int withRadio = Math.round(outWidth / realWith);int heightRadio = Math.round(outHeight / realHeight);inSampleSize = withRadio > heightRadio ? withRadio : heightRadio;}Log.e("压缩比率", String.valueOf(inSampleSize));return inSampleSize;}/*** 获取ImageView实际的宽度** @return 返回ImageView实际的宽度*/public int realImageViewWith() {DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();ViewGroup.LayoutParams layoutParams = getLayoutParams();//如果ImageView设置了宽度就可以获取实在宽带int width = getWidth();if (width <= 0) {//如果ImageView没有设置宽度,就获取父级容器的宽度width = layoutParams.width;}if (width <= 0) {//获取ImageView宽度的最大值width = getMaxWidth();}if (width <= 0) {//获取屏幕的宽度width = displayMetrics.widthPixels;}Log.e("ImageView实际的宽度", String.valueOf(width));return width;}/*** 获取ImageView实际的高度** @return 返回ImageView实际的高度*/public int realImageViewHeight() {DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();ViewGroup.LayoutParams layoutParams = getLayoutParams();//如果ImageView设置了高度就可以获取实在宽度int height = getHeight();if (height <= 0) {//如果ImageView没有设置高度,就获取父级容器的高度height = layoutParams.height;}if (height <= 0) {//获取ImageView高度的最大值height = getMaxHeight();}if (height <= 0) {//获取ImageView高度的最大值height = displayMetrics.heightPixels;}Log.e("ImageView实际的高度", String.valueOf(height));return height;}
}
 使用网络图片的效果图

使用缓存图片的效果图

 

使用图片加载框架Glide

 在这开源非常发达的时代,肯定会有大牛为我们做了个种各样的开源框架,根本不需要我们做这么复杂的工作,下面就简单使用图片加载框架Glide

在使用前要添加Glide的依赖库

compile 'com.github.bumptech.glide:glide:4.0.0'

刚才的条件不变,把点击事件的操作换成下面两行代码

String url = "https://pic.cnblogs.com/avatar/1142647/20170416093225.png";
Glide.with(MainActivity.this).load(url).into(myImageView);

是不是非常简单,有了这个开源库,你还愿意写那一大堆的代码吗,我想不会,更强大的是它已经有缓存功能,这一切它都帮你做好了。

加载网络图片的效果图

使用缓存的效果图

既然那么强大的开源库,我们就简单地了解它是如何使用的,先看看with()方法的源码,它可以接收6中参数,所以在各种情况下都能使用

    public static RequestManager with(Context context) {return getRetriever(context).get(context);}public static RequestManager with(Activity activity) {return getRetriever(activity).get(activity);}public static RequestManager with(FragmentActivity activity) {return getRetriever(activity).get(activity);}public static RequestManager with(android.app.Fragment fragment) {return getRetriever(fragment.getActivity()).get(fragment);}public static RequestManager with(Fragment fragment) {return getRetriever(fragment.getActivity()).get(fragment);}public static RequestManager with(View view) {return getRetriever(view.getContext()).get(view);}

然后是load()方法,虽然只有一个方法,但是所能做的事情却不少,比如我刚才只是传了一个String类型的,它就可以帮我加载了网络的图片,它还支持File(加载本地图片)、int(加载应用文件的源)、byte[](字节流)、Uri

public RequestBuilder<Drawable> load(@Nullable Object model) {return asDrawable().load(model);}

 我们就试试加载应用的图片

Glide.with(MainActivity.this).load(R.mipmap.ic_launcher).into(myImageView);

效果图

最后是into()方法,就是把我们要显示的ImageView加载进去,那就大功告成了。

重复使用过程Glide-->with()-->load()-->into()

项目源代码:https://resource.doiduoyi.com/#2o4csq2


http://chatgpt.dhexx.cn/article/6Y4okooE.shtml

相关文章

正则表达式匹配任意文本中的网络图片链接

原来的需求是要把石墨文档的文件完全搬到本地,但是图片都在云端,就需要用正则表达式匹配到文档里的网络图片链接,然后弄下来并改文件夹为本地路径。 后面增加了想法,有没有一个正则表达式可以把任意网络文件中的网络图片地址都匹配出来,不管这文本有多乱,只要这个文本可…

使用http协议获取网络图片

http用于传输WWW方式的数据。http协议采用了请求响应的模型。在android中提供了HttpURLConnection和HttpClient接口开发HTTP程序。下面分别使用这两种方式获取网络图片。 1.HttpURLConnection 代码如下&#xff1a; [html] view plain copy public class HttpURLConnectionAct…

python使用pillow下载网络图片到本地预览

安装方法&#xff1a; python -m pip install pillow项目github地址&#xff1a;https://github.com/python-pillow/Pillow 从网络中获取图片&#xff0c;整体的思路是&#xff1a; 使用requests读取图片变为字节流使用PIL读取并解析 示例代码 from PIL import Image # 导…

Java根据图片网络URL地址判断图片大小

1、测试类 package test;import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.net.Ht…

查看网络图片的地址

鼠标右键一般都会弹出几个选择&#xff0c;直接选择复制&#xff0c;有些是不同的可以选择选择复制图像地址(o) 这样就复制到图片的地址了 有些是有查看图片信息的&#xff0c;这个和点进去图片的界面有关系&#xff0c; 图片信息如下图 &#xff0c;下面的位置就是图片的地址…

常用图片网络地址

常用图片网络地址 posted 2016-11-25 22:30 ^_^小麦苗^_^ 阅读( ...) 评论( ...) 编辑 收藏

关于如何将网络图片地址转换成Base64位格式

今天在开发app过程中&#xff0c;由于项目需求的需要&#xff0c;要配合apiCloud的打印模块进行与打印机设备的连接&#xff0c;并打印二维码&#xff0c;进行出入库的操作&#xff0c;所以有了将图片转换成base64的功能实现。 ** 首先导入如下相关文件 以下是关于代码功能的…

java获取无后缀的网络图的地址【从url中获取图片格式】

文章目录 引入解决方案 引入 demo地址 我们往往会有需要将第三方图片转存的需求&#xff0c;然后第三方图片常常是一个没有格式的url地址&#xff0c;例如微信用户信息接口获取的用户图片地址如下&#xff1a; https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKCVCniciaWgO…

更改技嘉主板开机画面

一、 首先按照顺序安装3个软件.NET4.5, APP Center , BIOS 二、 安装完成后运行BIOS&#xff0c;点击Face wizard选项&#xff0c;在点击“浏览” 三、 选择需要更新的开机画面&#xff0c;点击OK 四、 出现更新的LOGO画面&#xff0c;点击下一步&#xff0c;

windows10一键修改开机动画

今天没什么事打开酷安的时候看到一篇关于windwos改开机动画的&#xff0c;所以就在网上找了半天&#xff0c;终于是发现了这个方法非常简单亲测&#xff01;&#xff01; 利用GitHub开源项目“HackBGRT”。 地址&#xff1a;https://github.com/Metabolix/HackBGRT/releases …

window 开机画面修改

1.修改启动项&#xff1a; 修改为&#xff1a; 2.把想实现的图片修改名称为&#xff1a;boot.bmp 把该图片放置到c:\windows 3.试验完成&#xff0c;重启即可&#xff01; 用了个猪头做开机画面&#xff0c;嘿嘿。。。。。 转载于:https://blog.51cto.com/dnsdhcp/324457

联想ThinkPad E14 如何修改BIOS开机画面LOGO

环境&#xff1a; 电脑&#xff1a;联想E14 系统&#xff1a;Windows 10 专业版 64位 问题描述&#xff1a; 联想ThinkPad E14修改BIOS开机画面LOGO 解决方案&#xff1a; 一、下载BIOS升级程序 1.打开ThinkPad官方网下载BIOS升级程序 2.点击驱动下载 3.输入主机序列号…

源码中修改Android的开机画面和动画

参照文章&#xff1a;http://blog.csdn.net/a345017062/article/details/6222962、http://bbs.gfan.com/android-146253-1-1.html。 Android系统开机显示画面分成两个过程&#xff0c;第一个过程从按电源键到Frameworks启动为止。第二个过程从Frameworks启动完成到Launcher程序…

android开机logo和动画修改

Android系统开机显示画面分成两个过程&#xff0c;第一个过程从按电源键到Frameworks启动为止。第二个过程从Frameworks启动完成到Launcher程序启动完成。 第一个过程显示的画面是一张图&#xff0c;第二个过程显示的是一个动画。分别简要记录一下怎么样在源码中修改这两个地方…

修改Windows7启动画面与登录画面

Windows7进入桌面前&#xff0c;要经过两次画面切换&#xff0c;首先是启动画面&#xff0c;其次是登录画面。这两个画面可以通过特殊处理修改。 一、修改启动画面 方式1&#xff1a; 如果只需要变成全黑&#xff0c;不显示任何动画与文字&#xff0c;可以禁用启动画面&…

修改电脑开机徽标教程

Windows10/11修改电脑开机徽标 目录&#xff1a;修改电脑开机徽标条件修改教程修改成功之后 目录&#xff1a; 修改电脑开机徽标条件 Windows10 32位系统及以上&#xff08;否则改不成功&#xff01;&#xff09; 修改教程 1.Windows10/Windows11系统按下WinR 打开运行框 2.在…

修改开机logo

如何修改电脑开机logo 主要步骤第零步第一步第二步第三步第四步第五步第六步第七步 开机logo是每一台笔记本电脑开机时展现出来的画面&#xff0c;通常情况下是电脑的品牌&#xff0c;例如&#xff0c;联想、神舟、戴尔等。接下来&#xff0c;我将分享一下更换开机logo的经验。…

Android修改开机动画

1.首先找到framework/base/data/sounds/bootanimation.zip 4.0 是在vendor/thirdapp/zh_CN/bootanim/system/media/bootanimation.zip 看一下结构: desc.txt part0 part1 三部分 part0,part1包含相关动画图片(PNG格式&#xff0c;分辨率与手机分辨率相同) desc.txt为配置文件内…

更改安卓系统开机画面

1&#xff1b;进入as的Device 找到文件夹system&#xff0c;再找到文件夹media。&#xff08;在设备的ES工具中也能看到&#xff0c;在电脑上看不到&#xff09; 2; 进去之后找到bootanimaton.zip 文件&#xff0c;将其导出&#xff08;save as&#xff09;&#xff0c;然后删…

BIOS全屏开机画面LOGO的修改

对于在自己主板上添加全屏开机LOGO的过程&#xff0c;好多文章都已经介绍了&#xff0c;本网站以前的文章中也有介绍&#xff0c;但是很多网友还是无法自己修改成功。但很多原因都是没有掌握好修改的方法&#xff0c;本网站将制作修改过程重新制作了一下&#xff0c;希望对不明…