Welcome![Sign In][Sign Up]
Location:
Search - gif r

Search list

[ASPX.NETASPX图片上传(水印、缩略图、远程保存)源码

Description:
很实用的一个图片上传得例子
图片上传:生成缩略图 加文字水印 图片水印
51aspx.png为水印图片
远程图片抓取(保存到本地)支持jpg、gif、bmp、png
图片抓取后自动以Auto+日期+原名称命名
输入远程图片地址(支持Html)

Platform: | Size: 489130 | Author: Simonz | Hits:

[Internet-Network用Java编写HTML文件分析程序

Description:

Java编写HTML文件分析程序

 一、概述

    

    Web服务器的核心是对Html文件中的各标记(Tag)作出正确的分析,一种编程语言的解释程序也是对源文件中的保留字进行分析再做解释的。实际应用中,我们也经常会碰到需要对某一特定类型文件进行要害字分析的情况,比如,需要将某个HTML文件下载并同时下载与之相关的.gif.class等文件,此时就要求对HTML文件中的标记进行分离,找出所需的文件名及目录。在Java出现以前,类似工作需要对文件中的每个字符进行分析,从中找出所需部分,不仅编程量大,且易出错。笔者在近期的项目中利用Java的输入流类StreamTokenizer进行HTML文件的分析,效果较好。在此,我们要实现从已知的Web页面下载HTML文件,对其进行分析后,下载该页面中包含的HTML文件(假如在Frame中)、图像文件和ClassJava Applet)文件。

    

    二、StreamTokenizer

    

    StreamTokenizer即令牌化输入流的作用是将一个输入流中变成令牌流。令牌流中的令牌实体有三类:单词(即多字符令牌)、单字符令牌和空白(包括JavaC/C++中的说明语句)。

    

    StreamTokenizer类的构造器为: StreamTokenizer(InputStream in)

    

    该类有一些公有实例变量:ttypesvalnval ,分别表示令牌类型、当前字符串值和当前数字值。当我们需要取得令牌(即HTML中的标记)之间的字符时,应访问变量sval。而读向下一个令牌的方法是调用nextToken()。方法nextToken()的返回值是int型,共有四种可能的返回:

    

    StreamTokenizer.TT_NUMBER: 表示读到的令牌是数字,数字的值是double型,可以从实例变量nval中读取。

    

    StreamTokenizer.TT_Word: 表示读到的令牌是非数字的单词(其他字符也在其中),单词可以从实例变量sval中读取。

    

    StreamTokenizer.TT_EOL: 表示读到的令牌是行结束符。

    

    假如已读到流的尽头,则nextToken()返回TT_EOF

    

    开始调用nextToken()之前,要设置输入流的语法表,以便使分析器辨识不同的字符。WhitespaceChars(int low, int hi)方法定义没有意义的字符的范围。WordChars(int low, int hi)方法定义构造单词的字符范围。

    

    三、程序实现

    

    1HtmlTokenizer类的实现

    

    对某个令牌流进行分析之前,首先应对该令牌流的语法表进行设置,在本例中,即是让程序分出哪个单词是HTML的标记。下面给出针对我们需要的HTML标记的令牌流类定义,它是StreamTokenizer的子类:

    

    

    import java.io.*;

    import java.lang.String;

    class HtmlTokenizer extends

    StreamTokenizer {

    //定义各标记,这里的标记仅是本例中必须的,

    可根据需要自行扩充

     static int HTML_TEXT=-1;

     static int HTML_UNKNOWN=-2;

     static int HTML_EOF=-3;

     static int HTML_IMAGE=-4;

     static int HTML_FRAME=-5;

     static int HTML_BACKGROUND=-6;

     static int HTML_APPLET=-7;

    

    boolean outsideTag=true; //判定是否在标记之中

    

     //构造器,定义该令牌流的语法表。

     public HtmlTokenizer(BufferedReader r) {

    super(r);

    this.resetSyntax(); //重置语法表

    this.wordChars(0,255); //令牌范围为全部字符

    this.ordinaryChar('< '); //HTML标记两边的分割符

    this.ordinaryChar('>');

     } //end of constrUCtor

    

     public int nextHtml(){

    int token; //令牌

    try{

    switch(token=this.nextToken()){

    case StreamTokenizer.TT_EOF:

    //假如已读到流的尽头,则返回TT_EOF

    return HTML_EOF;

    case '< ': //进入标记字段

    outsideTag=false;

    return nextHtml();

    case '>': //出标记字段

    outsideTag=true;

    return nextHtml();

    case StreamTokenizer.TT_WORD:

    //若当前令牌为单词,判定是哪个标记

    if (allWhite(sval))

     return nextHtml(); //过滤其中空格

    else if(sval.toUpperCase().indexOf("FRAME")

    !=-1 && !outsideTag) //标记FRAME

     return HTML_FRAME;

    else if(sval.toUpperCase().indexOf("IMG")

    !=-1 && !outsideTag) //标记IMG

     return HTML_IMAGE;

    else if(sval.toUpperCase().indexOf("BACKGROUND")

    !=-1 && !outsideTag) //标记BACKGROUND

     return HTML_BACKGROUND;

    else if(sval.toUpperCase().indexOf("APPLET")

    !=-1 && !outsideTag) //标记APPLET

     return HTML_APPLET;

    default:

    System.out.println ("Unknown tag: "+token);

    return HTML_UNKNOWN;

     } //end of case

    }catch(IOException e){

    System.out.println("Error:"+e.getMessage());}

    return HTML_UNKNOWN;

     } //end of nextHtml

    

    protected boolean allWhite(String s){//过滤所有空格

    //实现略

     }// end of allWhite

    

    } //end of class

    

    以上方法在近期项目中测试通过,操作系统为Windows NT4,编程工具使用Inprise Jbuilder3


Platform: | Size: 1066 | Author: tiberxu | Hits:

[JSP/Javadelineate-0.5

Description: Delineate is a tool for converting bitmap raster images to SVG (Scalable Vector Graphics) using AutoTrace or potrace. It displays SVG results using Apache Batik. Input formats are JPEG, PNG, GIF, BMP, TIFF, PNM, PBM, PGM, PPM, IFF,PCD, PSD, RAS. -Delineate is a tool for converting bitmap r Aster images to SVG (Scalable Vector Graphics) using AutoTrace or potrace. It displays SVG res ults using Apache Safari. Input formats are JPEG , PNG, GIF, BMP, TIFF, PNM, PBM, PGM, PPM, IFF, PCD, PSD, RAS.
Platform: | Size: 3621824 | Author: Jet Lan | Hits:

[Special EffectsImageStone_src

Description: ImageStone is a powerful C++ class library for image manipulation. It is written in pure C++ and easy portable. It includes load/save(support BMP GIF JPG PNG TIF ICO TGA PCX PSD...), display, histogram, undo/redo and transform image with over 100 predefined effects. -ImageStone C is a powerful class library az r image manipulation. It is written in pure C and easy portable. It includes load / save (support BMP GIF JPG PNG TIF ICO TGA PCX PSD ...), display, histogram, undo / redo and transform image with over 100 pre defined effects.
Platform: | Size: 634707 | Author: 王莉 | Hits:

[Otherrelink

Description: MFC IIS防盗链 开发环境 vc++ 7.0(MFC) / windows 2003 sp1 / iis6.1 主要功能: 1 防盗链 2 限制文件下载线程数 3 限制文件下载速度 使用方法: 1 打开Internet 信息服务(IIS)管理器/本地计算机/网站/默认网站/属性/ISAPI筛选器/添加 2 名称随便 文件 选择你解压缩下来的relink.dll 3 重启IIS 4 打开ReLink.ini 具体参数: [settings] url= 允许外部链接的网站地址 以\"|\"号分开 如\"xfrog.cn|webtm.cn\" extension=gif|jpg|png|psd|bmp|swf|midi|wav|mp3|wma|avi|mpg|wmv|asf|rm|rmvb|zip|rar 需要过滤 监测的文件类型 以\"|\"号分开 speed=50 文件下载速度 单位\"K\" 需知 因为网络环境的不同 没那么准确 thread=2 单文件下载最大线程-MFC IIS defense Daolian vc Development Environment 7.0 (MFC) / windows 2003's p1 / iis6.1 main functions : a defense Daolian two restrictions download threads number three download speed limit use : an open Internet Information Services (IIS) Management / local computer / website / Default Web / Attribute / ISAPI Filter / add two names casually paper of your choice extract from the three heavy relink.dll Kai IIS 4 Open ReLink.ini specific parameters : [settings] url = allow external link to the website address of the "|", as separate "xfrog. cn | webtm.cn "extension = gif | jpg | png | psd | bm p | swf | midi | wav | mp3 | wma | avi | mpg | wmv | asf | r m | RealNetworks | zip | rar need to filter monitoring the file type "|" = 50 separate speed File Downl
Platform: | Size: 12438 | Author: 莫飞 | Hits:

[JSP/Javadelineate-0.5

Description: Delineate is a tool for converting bitmap raster images to SVG (Scalable Vector Graphics) using AutoTrace or potrace. It displays SVG results using Apache Batik. Input formats are JPEG, PNG, GIF, BMP, TIFF, PNM, PBM, PGM, PPM, IFF,PCD, PSD, RAS. -Delineate is a tool for converting bitmap r Aster images to SVG (Scalable Vector Graphics) using AutoTrace or potrace. It displays SVG res ults using Apache Safari. Input formats are JPEG , PNG, GIF, BMP, TIFF, PNM, PBM, PGM, PPM, IFF, PCD, PSD, RAS.
Platform: | Size: 3621888 | Author: Jet Lan | Hits:

[Special EffectsImageStone_src

Description: ImageStone is a powerful C++ class library for image manipulation. It is written in pure C++ and easy portable. It includes load/save(support BMP GIF JPG PNG TIF ICO TGA PCX PSD...), display, histogram, undo/redo and transform image with over 100 predefined effects. -ImageStone C is a powerful class library az r image manipulation. It is written in pure C and easy portable. It includes load/save (support BMP GIF JPG PNG TIF ICO TGA PCX PSD ...), display, histogram, undo/redo and transform image with over 100 pre defined effects.
Platform: | Size: 3330048 | Author: | Hits:

[WEB CodeXxaspDisk

Description: 使用ASP脚本编写,大量使用类封装,是一个高速、高效、简洁、安全、支持多组件的上传与提取系统。 主要特点: 1、支持国内外上传组件多达7种,包括:风声无组件上传类、AspUpload 3.0上传组件、SA-FileUp 4.9上传组件 DvFile.Upload 1.0上传组件、IronSoft.Upload上传组件、LyfUpload.UploadFile上传组件、W3.Upload上传组件 2、支持多文件同时上传、Jpeg,Gif图片生成缩略图、生成文字水印、生成图片水印. 3、合理的使用系统缓存技术,在加速页面执行的同时不对服务器造成资源的浪费。 4、本系统使用的是Asptemplate模板类,您可以使用轻松的修改出绚丽的页面。 5、系统从程序底层防止上传漏洞,防止任何恶意脚本文件的上传,确保系统的安全。 6、功能强大的后台,具体功能包括: 系统设置: 系统基本设置,系统配置还原 用户管理: 会员管理 管理员管理 屏蔽IP 文件管理: 上传文件管理器 系统文件管理器 上传文件清理器 友情链接: 添加友情链接 友情链接管理 数据库管理: 数据备份 数据还原 查看系统空间占用-use ASP scripting, the extensive use of Class Packaging is a fast, efficient, simple, safe, support multi-component system uploads and extraction. Main features : a support at home and abroad uploads up to seven components, including : no wind components Upload category, AspUpload 3.0 Upload components, SA-FileUp 4.9 Upload components DvFile.Upload 1.0 Upload components, IronSoft.Upload Upload components, LyfUpload.UploadFile Upload components W3.Upload uploads two components, It also supports multi-upload, Jpeg, Gif generate thumbnail pictures, generate text watermark, the watermark generated images. 3. rational use of system cache technology, the accelerated implementation of pages wrong server is a waste of resources. 4, the use of the system is Asptemplate template type, you can use th
Platform: | Size: 440320 | Author: | Hits:

[Otherrelink

Description: MFC IIS防盗链 开发环境 vc++ 7.0(MFC) / windows 2003 sp1 / iis6.1 主要功能: 1 防盗链 2 限制文件下载线程数 3 限制文件下载速度 使用方法: 1 打开Internet 信息服务(IIS)管理器/本地计算机/网站/默认网站/属性/ISAPI筛选器/添加 2 名称随便 文件 选择你解压缩下来的relink.dll 3 重启IIS 4 打开ReLink.ini 具体参数: [settings] url= 允许外部链接的网站地址 以"|"号分开 如"xfrog.cn|webtm.cn" extension=gif|jpg|png|psd|bmp|swf|midi|wav|mp3|wma|avi|mpg|wmv|asf|rm|rmvb|zip|rar 需要过滤 监测的文件类型 以"|"号分开 speed=50 文件下载速度 单位"K" 需知 因为网络环境的不同 没那么准确 thread=2 单文件下载最大线程-MFC IIS defense Daolian vc Development Environment 7.0 (MFC)/windows 2003's p1/iis6.1 main functions : a defense Daolian two restrictions download threads number three download speed limit use : an open Internet Information Services (IIS) Management/local computer/website/Default Web/Attribute/ISAPI Filter/add two names casually paper of your choice extract from the three heavy relink.dll Kai IIS 4 Open ReLink.ini specific parameters : [settings] url = allow external link to the website address of the "|", as separate "xfrog. cn | webtm.cn "extension = gif | jpg | png | psd | bm p | swf | midi | wav | mp3 | wma | avi | mpg | wmv | asf | r m | RealNetworks | zip | rar need to filter monitoring the file type "|" = 50 separate speed File Downl
Platform: | Size: 12288 | Author: 莫飞 | Hits:

[Compress-Decompress algrithmsGif_codec

Description: GIF图片解压成RGB格式的程序,可根据需要,转成灰阶或其它格式-GIF images into RGB format decompression procedures can be, converted into gray-scale or other format
Platform: | Size: 8192 | Author: 刘飞 | Hits:

[Picture Viewergds31f

Description: 观看,替换和转换 GIF/JPG/PCX/TIF/IFF/LBM/DL/ HAM/BMP/RLE/TGA/MAC/WPG/CUT/ANSI/TXT/IMG/ PBM/CUT/GL/FLI/MPG显示极小的图象-Views, replacement and conversion of GIF/JPG/PCX/TIF/IFF/LBM/DL/HAM/BMP/RLE/TGA/MAC/WPG/CUT/ANSI/TXT/IMG/PBM/CUT/GL/FLI/MPG showed very small image
Platform: | Size: 379904 | Author: 风凉 | Hits:

[Picture ViewerSignImage

Description: 1、选择文件夹后,能将选中的文件夹或包含其子文件夹下所有的BMP/JPG/GIF等常见图片格式导入到列表中 2、设置字体,可以设置签名的字体和颜色 3、可以预览图片 4、可以单张签名 5、设置签名位置和字体格式后,点击“批量签名”,可以实现列表中图片批量签名/签字 6、签名后自动保存(覆盖原有图片)为JPG格式 7、字体的背景是透明的,比Windows自带的画图工具签名更好用 -1, select the folder, to select the folder or its sub-folders contain all of the BMP/JPG/GIF picture format common to the list into 2, set the font, you can set the font and color Signed 3, you can preview picture 4, you can sign leaflets 5, set up a signature location and font format, click on the " bulk signature" can be achieved in the picture list bulk Signature/signature 6, the signature automatically saved (covering the original picture) for the JPG format 7, background is transparent fonts than Windows built-in drawing tools and better use of the signature
Platform: | Size: 422912 | Author: macolin | Hits:

[WEB Codeascii-art

Description: ASCIIArtist is a class to convert Bitmap-Images into nice ASCII Texts in HTML format written by Sebastian Rö bke. It is written in PHP and provides 3 different render modes and support for JPG, PNG and GIF (if your PHP supports it, too).
Platform: | Size: 101376 | Author: Juanito Perez | Hits:

[Internet-NetworkQQnongchangVC2008

Description: QQ农场外挂 VC2008源代码 农场外挂源代码 农场源代码 -//验证QQ密码 bool WebQQFunction::LoginQQ(CString qqname, CString qqmm, CString qqxym, CString outstr) { CHttpConnection*pHttpConnect = Session.GetHttpConnection("ptlogin2.qq.com") CString szFormData CHttpFile* pFile qqxym.MakeUpper() szFormData.Format("u= s&p= s&verifycode= s",qqname,GetQQmd5pass(qqmm,qqxym),qqxym) szFormData+="&aid=15000102&u1=http 3A 2F 2Fxiaoyou.qq.com 2Findex.php 3Fmod 3Dlogin&fp=&h=1&ptredirect=1&ptlang=0&from_ui=1&dumy=1" if( pHttpConnect ) { pFile = pHttpConnect->OpenRequest( CHttpConnection::HTTP_VERB_POST,"/login") } if (pFile) { // pFile->AddRequestHeaders("POST /login HTTP/1.1\n") pFile->AddRequestHeaders("Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword,*/*\n") pFile->AddRequestHeaders("Referer: http://ui.ptlogin2.qq.com/cgi-bin/login?appid=15000102\n")
Platform: | Size: 268288 | Author: 罗俊杰 | Hits:

[Industry researcho-c-r-p

Description: OCR swing project which is used to detect OCR gif file-OCR swing project which is used to detect OCR gif file
Platform: | Size: 9355264 | Author: arun | Hits:

[Special Effectsphoto

Description: 可以处理JPG、PNG、GIF、BMP - 照片处理格式 24位 BMP 24位 54个字节是头 能说明这个文件是什么格式 如果是照片就能说明照片的大小 后面就是数据 R G B 24位-BMP photo
Platform: | Size: 7168 | Author: 王丽 | Hits:

CodeBus www.codebus.net