资源简介
图片加密,解密程序,有源码.使用:输入图片所在文件夹,格式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增强现实的视频实现代码
相关资源
- TSCC.exe
- 梯控模糊搜索.exe
- SPD博士V5.3.exe
- XE7UP1Kg13_Unis.exe
- Eeupdate.exe
- Zprotect专业版(无限制) 一机一码E
- EXE 转换 BAT工具
- 专门修改exe文件的资源
- delphi版在内存中运行exe
- SSD4 exercise8答案
- jar转exe工具 教程,exe能在客户端没有
- 一个可以由SVCHost.exe服务调用的dll模块
- 文件夹变exe病毒专杀工具免费版.rar
- MikroTik RouterOS密码破解 mtpass.exe
- ChilledWindows.exe(玩笑病毒)
- ccleaner专业版安装exe
- Kvsc3.exe、Kvsc3.dll病毒查杀清除方法
- 磁盘共享工具 nfs.exe
- PSFTP.EXE 工具
- office2010时安装找不到dwtrig20.exe
- delphi修改exe图标
- 合并多个DLL或EXE 工具+说明.rar
- frcc.exe fastreport编译中文没乱码
- SecSetup.exe
- lr_Del_license.exe LoadRunner 注册表清除工
- skylarinst-winc.exe
- s7epasrvx.exe CP2102_USB_to_UART_Bridge_Contro
- Enol functionalized N-heterocyclic carbene lan
- 格式工厂所缺失的mp4creator.exe
- jdk-8u201-windows-x64.exe
评论
共有 条评论