github上面所有图片无法加载出来

问题描述如下:

github上面所有图片无法加载出来……

解决方案:

感恩参考如下:

https://blog.csdn.net/qq_38232598/article/details/91346392

修改host文件,终端中:

sudo gedit /etc/hosts

将下面复制到host文件中:

# GitHub Start 
140.82.113.3      github.com
140.82.114.20     gist.github.com

151.101.184.133    assets-cdn.github.com
151.101.184.133    raw.githubusercontent.com
151.101.184.133    gist.githubusercontent.com
151.101.184.133    cloud.githubusercontent.com
151.101.184.133    camo.githubusercontent.com
151.101.184.133    avatars0.githubusercontent.com
199.232.68.133     avatars0.githubusercontent.com
199.232.28.133     avatars1.githubusercontent.com
151.101.184.133    avatars1.githubusercontent.com
151.101.184.133    avatars2.githubusercontent.com
199.232.28.133     avatars2.githubusercontent.com
151.101.184.133    avatars3.githubusercontent.com
199.232.68.133     avatars3.githubusercontent.com
151.101.184.133    avatars4.githubusercontent.com
199.232.68.133     avatars4.githubusercontent.com
151.101.184.133    avatars5.githubusercontent.com
199.232.68.133     avatars5.githubusercontent.com
151.101.184.133    avatars6.githubusercontent.com
199.232.68.133     avatars6.githubusercontent.com
151.101.184.133    avatars7.githubusercontent.com
199.232.68.133     avatars7.githubusercontent.com
151.101.184.133    avatars8.githubusercontent.com
199.232.68.133     avatars8.githubusercontent.com

# GitHub End

OK!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
JavaPNG是一个用于和处理PNG图像的Java库。它提供了一组简单易用的API,可以方便地读取和操作PNG图像文件。 要使用JavaPNGPNG图像,首先需要导入JavaPNG库。可以通过在项目的构建文件中添JavaPNG的依赖项来实现。例如,如果使用Maven构建项目,可以在pom.xml文件中添以下依赖项: ```xml <dependency> <groupId>com.github.nwillc</groupId> <artifactId>javapng</artifactId> <version>0.9.1</version> </dependency> ``` 一旦导入了JavaPNG库,就可以使用它提供的API来和处理PNG图像。以下是一个简单的示例代码,展示了如何使用JavaPNGPNG图像: ```java import com.github.nwillc.javapng.*; public class PNGLoader { public static void main(String[] args) { try { // PNG图像文件 PngReader reader = new PngReader(new File("image.png")); // 获取图像的宽度和高度 int width = reader.getWidth(); int height = reader.getHeight(); // 遍历图像的每个像素 for (int row = 0; row < height; row++) { for (int col = 0; col < width; col++) { // 获取像素的RGB值 int rgb = reader.getRGB(row, col); // 处理像素 } } // 关闭PNG图像读取器 reader.close(); } catch (IOException e) { e.printStackTrace(); } } } ``` 在上面的示例代码中,首先创建了一个PngReader对象,用于读取PNG图像文件。然后通过调用getWidth()和getHeight()方法获取图像的宽度和高度。接下来使用嵌套的循环遍历图像的每个像素,并通过调用getRGB()方法获取每个像素的RGB值。在处理像素的部分,可以根据需要进行相应的操作。最后,记得在使用完PNG图像读取器后调用close()方法关闭它。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值