freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

畢業(yè)論文--基于java網(wǎng)絡(luò)相冊系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)(編輯修改稿)

2024-12-20 21:41 本頁面
 

【文章內(nèi)容簡介】 ,相片資料的上傳是必不可少的功能,但隨著高分辨率相片的普及,上傳圖片的容量會很大,例如 300 萬像素的相片文件大小基本上是大于 600KB。在很多圖片的網(wǎng)頁中,圖片容量越大打開網(wǎng)頁的速度越慢。為了解決這個(gè)問題,用戶上傳圖片時(shí)可以在類中處理一張大相片并縮小它。 將大相片進(jìn)行縮小的代碼如下: public static void createSmallPhoto(String photoPath,String smallPath) { File_file=newFile(photoPath)。 //讀入文件 Image src。 try { src=(_file)。 int wideth=110。 intheight=80。 BufferedImagetag=newBufferedImage(wideth,height,B)。 ().drawImage(src,0,0,wideth,height,null)。 //繪制縮小后的圖 ileOutputStreamout=newFileOutputStream(smallPath)。 //輸出到文件流 JPEGImageEncoderencoder=(out)。 (tag)。 ()。 }catch (IOException e){ ()。 } } 在上述代碼中,參數(shù) photoPath 表示上傳相片的地址,參數(shù) smallPath 表示生成縮略相片的地址。在該方法中,首先將 photoPath 參數(shù)轉(zhuǎn)換成 Image 對象 src,構(gòu)造目標(biāo)文件 tag,設(shè)置 tag 的長度和寬度,對 tag 進(jìn)行編碼,輸出到文件流 out,最后關(guān)閉文件流。 相片水印效果 給圖片加水印就是在圖片加入指定文字。網(wǎng)頁中的圖片上面寫著網(wǎng)站的名稱和地址,添加文字的作用就是可以最大限度防止盜用,同時(shí)也起到標(biāo)識相片的功能。本實(shí)例中,添加水印效果使用一個(gè) JavaBean 的 createMark()方法,該方方案論證 第 19 頁(共 46 頁) 19 法的具體實(shí)現(xiàn)代碼如下: Public static Boolean createMark(String filePath, String printPath, String markContent){ ImageIcon imgIcon=new ImageIcon (filePath); //讀取源圖片內(nèi)容 Image theImg=()。 //讀取圖片的信息 int width=(null)。 //讀取圖片的寬度 int height= (null)。 //讀取圖片的長度 BufferedImagebimage=newBufferedImage(width,height,E_INT_RGB)。 Graphics2D g=()。 ()。 //設(shè)置文字顏色為紅色 (theImg,0,0,null)。 Font font=new Font(markContent,200)。 //對文字進(jìn)行加粗 (font)。 ((,0.5f))。 //透明 ()。 //文字的旋轉(zhuǎn)角度 g,drawString(markContent,width/3,height/3)。 //繪制文字的位置 ()。 try { //通過輸出流生成圖片內(nèi)容 FileOutputStream out=new FileOutputStream(printPath)。 JPEGImageEncoder encoder=(out)。 JPEGEncodeParamparam=(bimage)。 (100f,true)。 (bimage,param)。 ()。 }catch(Exception e) { ()。 return false。 } return true。 基于 Java網(wǎng)絡(luò)相冊系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 第 20 頁(共 46 頁) 20 } 7 站點(diǎn)運(yùn)行情況 在網(wǎng)絡(luò)相冊模塊的實(shí)現(xiàn)中,對于設(shè)計(jì)中的系統(tǒng)功能模塊我基本上都已 實(shí)現(xiàn),并且運(yùn)行正常。在模塊的設(shè)計(jì)上還是有些欠缺。 8 結(jié)束語 在這次設(shè)計(jì)中,我完成了用戶注冊、登錄,分欄顯示相冊,滾動瀏覽相片,幻燈片瀏覽相片,批量上傳相片,相片加水印,刪除相片等基本功能。通過這次設(shè)計(jì),我對 Java 和 SQLServer 技術(shù)在網(wǎng)絡(luò)相冊模塊的應(yīng)用有了更深一層的認(rèn)識和應(yīng)用。在以后設(shè)計(jì)中可能會遇到一些意想不到的難題,我會在以后的學(xué)習(xí)和工作中會做進(jìn)一步的學(xué)習(xí)和探索,以取得更大的進(jìn)步。 方案論證 第 21 頁(共 46 頁) 21 附錄: 判斷用戶是否登錄 %@ page contentType=text/html。 charset=gb2312 language=java import=.*,.*,.* errorPage= % html head meta equiv=ContentType content=text/html。 charset=gb2312 / link href=css/ type=text/css rel=stylesheet / %@ taglib prefix=c uri= % jsp:useBean id=dao scope=page class=/jsp:useBean title宇晨相冊 ——首頁 /title /head body table border=0 align=center cellpadding=0 cellspacing=0 tr tdimg src=images/ width=753 height=200/td /tr /table table width=753 height=36 border=0 align=center cellpadding=0 cellspacing=0 background=images/ tr td width=48 /td td width=705 valign=toptable width=481 border=0 cellspacing=0 基于 Java網(wǎng)絡(luò)相冊系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 第 22 頁(共 46 頁) 22 cellpadding=0 tr td height=31font color=EDE6BCa href= class=a1相冊首頁 /a b|/b c:if test=${==null} a href= onclick=javascript:checkUserInfo() title=請您先登錄 class=a1我的相冊 /a /c:if c:if test=${!=null} a href=photoServlet?info=userQueryPhoto class=a1我的相冊 /a /c:if b|/b a href= class=a1 分類相冊 /a b|/b a href= class=a1 手機(jī)相冊/a/font/td /tr /table/td /tr /table table height=597 border=0 align=center cellpadding=0 cellspacing=0 tr td img src=images/ width=9 height=597/td td width=535 valign=top background=images/ br % ListPhoto list1=(ListPhoto)(list)。 int a=0。 for(Photo photo1:list1){ % table border=0 align=center cellpadding=0 cellspacing=0 tr td height=20 colspan=2 class=word_black%=()%/td td height=20 class=word_black align=righta href=photoServlet?info=queryPhotoListamp。type=%=()% 更多 /a/td /tr tr align=center % ListPhoto list2=(photoType=39。+()+39。)。 int b=0。 方案論證 第 23 頁(共 46 頁) 23 for(Photo photo2:list2){ % td width=134 height=103 background=images/a href=photoServlet?info=queryOnePhotoamp。id=%=()%i mg src=%=()% class=cannelBorder/a/td % b++。 if(b==3) break。 } if(()3){ for(int i=0。i()。i++){ % td width=134 height=103 background=images/無 /td %} } % /tr /table table width=504 border=0 cellpadding=0 cellspacing=0 tr td width=504hr/td /tr /table % a++。 if(a==3) break。 } % table width=450 height=100 border=0 align=center cellpadding=0 cellspacing=0 tr td height=40 class=word_black其他類別相冊 /td /tr tr td height=47 a href=photoServlet?info=queryPhotoListamp。type=朋友情深 朋友情深/a a href=photoServlet?info=queryPhotoListamp。type=甜蜜愛情 甜蜜愛情 /a a href=photoServlet?info=queryPhotoListamp。type=親親 寶 貝 親親寶貝/a a href=photoServlet?info=queryPhotoListamp。type=動漫卡通 動 漫卡通 /a a href=photoServlet?info=queryPhotoListamp。type=游戲圖案/a a href=photoServlet?info=queryPhotoListamp。type=搞笑貼圖 搞笑貼圖 /a a href=photoServlet?info=queryPhotoListamp。type=四季印象 四季印象/abrbr 基于 Java網(wǎng)絡(luò)相冊系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn) 第 24 頁(共 46 頁)
點(diǎn)擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1