资源简介
图片加密,解密程序,有源码.使用:输入图片所在文件夹,格式d:\\xxx\\;需要自己安装jdk才可运行,jdk1.7,1.8
代码片段和文件信息
package com.study.second.photodear;
import java.awt.Color;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.base64;
import java.util.List;
import java.util.Vector;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.function.Supplier;
import javax.imageio.ImageIO;
import javax.swing.JButton;
import javax.swing.Jframe;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class ImageBinary extends Jframe implements ActionListener{
ExecutorService executor=Executors.newFixedThreadPool(1);
//图片地址文本框
private JTextField resultText1=new JTextField(“图片地址“);
private JTextField resultText2=new JTextField(“编码地址“);
private JTextField resultText3=new JTextField(“编码地址“);
private JTextField resultText4=new JTextField(“解码地址“);
private JLabel m=null;
private JLabel divide=null;
private JLabel s=null;
private int i=0j=0;
private boolean run=true;
private int type0=0;//编码图片
private int type1=1;//解码图片
public ImageBinary(){
super();
init();
this.setBackground(Color.LIGHT_GRAY);
this.settitle(“图片编码工具“);
this.setLocation(500 300);
//允许修改大小
this.setResizable(true);
this.pack();
}
// public static void main1(String[] args) throws IOException {
// String fileName = “D://code//22.jpg“;
// //System.out.println(“---“+getImageBinary(fileName));
// FileOutputStream fo=new FileOutputStream(new File(“d:\\code\\test.txt“));
// fo.write(getImageBinary(fileName).getBytes());
// saveImage(getImageBinary(fileName));
// }
public void init(){
JPanel encode=new JPanel();
encode.setLayout(new GridLayout(1 3 3 3));
encode.add(resultText1);
encode.add(resultText2);
JButton encodeButton=new JButton(“编码“);
encodeButton.setForeground(Color.BLUE);
encode.add(encodeButton);
encodeButton.addActionListener(this);
JPanel decode=new JPanel();
decode.setLayout(new GridLayout(1 3 3 3));
decode.add(resultText3);
decode.add(resultText4);
JButton decodeButton=new JButton(“解码“);
decodeButton.setForeground(Color.BLUE);
decode.add(decodeButton);
decodeButton.addActionListener(this);
m=new JLabel(“0“);
divide=new JLabel(“:“);
s=new JLabel(“00“);
m.setFont(new Font(“Consulas“Font.PLAIN36));
divide.setFont(new Font(“Consulas“Font.PLAIN36));
s.setFont(new Font(“Consulas“Font.PLAIN36));
JPanel center=new JPanel();
center.add(m);
center.add(divide);
center.add(s);
JPanel bottom=new JPanel();
bott
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-11-27 18:28 photo\
目录 0 2018-11-27 09:58 photo\com\
目录 0 2018-11-27 09:58 photo\com\study\
目录 0 2018-11-27 09:58 photo\com\study\second\
目录 0 2018-11-27 18:23 photo\com\study\second\photodear\
文件 4455 2018-11-27 09:37 photo\com\study\second\photodear\ImageBinary.class
文件 9295 2018-11-27 18:18 photo\com\study\second\photodear\ImageBinary.java
目录 0 2018-11-27 09:58 photo\me
文件 77 2018-11-27 10:00 photo\me
文件 454656 2018-11-27 18:26 photo\photo.exe
文件 7101 2018-11-27 18:21 photo\photo.jar
- 上一篇:PPT倒计时定时器
- 下一篇:基于openGL、pygame增强现实的视频实现代码
相关资源
- lcx.exe原版 端口转发
- js调用本地exe(根据注册表读取内容)
- hadoop的winutils.exe及dll文件
- 80端口宽带账号密码爆破工具最新版
-
监控录像文件(Pla
yer.exe)播放器 - 正版熊族.EXE
- 10位IC卡号转8位卡号.exe
- 财务收支管理系统Excel模板.xlsx
- USB设备记录清除.exe
- winso.exe 镜像工具
- PacketTracer721_64bit_setup.exe
- pulist.exe
- dseo13b.exe
- checkcode.exe
- Anaconda3-5.2.0-Windows-x86_64.exe
- 圣诞树.exe
- hadoop的winutils.exe工具和hadoop.dll
- jdk-8u221-linux-x64.tar.gz&jdk;-8u221-windows-
- findjmp.exe
- exe文件捆绑器(可设置图标志)
- ildasm.exe和ilasm.exe
- AnyFileToByte.exe
- vdexExtractor
- KiteSetup.exe
- MDKCM524.EXE
-
robotfr
amework-ride-1.3.win-amd64.exe - winfix.exe116783
- SSD7 exercise5 答案
- FTD2XX.dll和oflash.exe
- Symantec_BackupExec2012.7z
评论
共有 条评论