• 大小: 256KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-29
  • 语言: 其他
  • 标签: exe  

资源简介

图片加密,解密程序,有源码.使用:输入图片所在文件夹,格式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\meta-INF\
     文件          77  2018-11-27 10:00  photo\meta-INF\MANIFEST.MF
     文件      454656  2018-11-27 18:26  photo\photo.exe
     文件        7101  2018-11-27 18:21  photo\photo.jar

评论

共有 条评论