當前位置:首頁 » 編程語言 » java摳圖

java摳圖

發布時間: 2022-06-18 07:00:24

『壹』 如何用java 實現摳圖

選中你想摳圖的圖片,右鍵,選中編輯選項,進入"畫圖"程序
2、按住"Ctrl+A",選中圖片,"Ctrl+C"復制圖片

『貳』 java語言取得成功的關鍵是定位於什麼開發

在於虛擬機技術,安裝了虛擬機,Java程序可以在任何機器上運行

『叄』 oppoR3在哪裡智能摳圖

oppo a125 是一款非智能機,A125定位於針對初高中學生群體的入門級手機,雖然是一款非智能手機,但其強大的JAVA功能,足以應付初高中學生群體的使用。另外其音質效果及學習功能是非常適用的。另外其價格不高,但不是智能機,1支持自定義主題,還可以設置成自動換主題,前面有個呼吸燈。內置ucweb7.0,java應該比較好。QQ2010可以後台。java可以後台。價格在1000元左右!

『肆』 PS摳圖的問題

選擇,編輯,拷貝,再粘貼。右下角原圖,點下眼睛,粘貼出來的點上眼睛,把圖片保存為PNG。

『伍』 怎麼用java實現摳圖功能

package com.thinkgem.jeesite.moles.file.utils;

import com.drew.imaging.ImageMetadataReader;
import com.drew.imaging.ImageProcessingException;
import com.drew.metadata.Directory;
import com.drew.metadata.Metadata;
import com.drew.metadata.Tag;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.*;

public class ImageUtils {

/**
* 圖片去白色的背景,並裁切
*
* @param image 圖片
* @param range 范圍 1-255 越大 容錯越高 去掉的背景越多
* @return 圖片
* @throws Exception 異常
*/
public static byte[] transferAlpha(Image image, InputStream in, int range) throws Exception {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
try {
ImageIcon imageIcon = new ImageIcon(image);
BufferedImage bufferedImage = new BufferedImage(imageIcon
.getIconWidth(), imageIcon.getIconHeight(),
BufferedImage.TYPE_4BYTE_ABGR);
Graphics2D g2D = (Graphics2D) bufferedImage.getGraphics();
g2D.drawImage(imageIcon.getImage(), 0, 0, imageIcon
.getImageObserver());
int alpha = 0;
int minX = bufferedImage.getWidth();
int minY = bufferedImage.getHeight();
int maxX = 0;
int maxY = 0;

for (int j1 = bufferedImage.getMinY(); j1 < bufferedImage
.getHeight(); j1++) {
for (int j2 = bufferedImage.getMinX(); j2 < bufferedImage
.getWidth(); j2++) {
int rgb = bufferedImage.getRGB(j2, j1);

int R = (rgb & 0xff0000) >> 16;
int G = (rgb & 0xff00) >> 8;
int B = (rgb & 0xff);
if (((255 - R) < range) && ((255 - G) < range) && ((255 - B) < range)) { //去除白色背景;
rgb = ((alpha + 1) << 24) | (rgb & 0x00ffffff);
} else {
minX = minX <= j2 ? minX : j2;
minY = minY <= j1 ? minY : j1;
maxX = maxX >= j2 ? maxX : j2;
maxY = maxY >= j1 ? maxY : j1;
}
bufferedImage.setRGB(j2, j1, rgb);
}
}
int width = maxX - minX;
int height = maxY - minY;
BufferedImage sub = bufferedImage.getSubimage(minX, minY, width, height);
int degree = getDegree(in);
sub = rotateImage(sub,degree);
ImageIO.write(sub, "png", byteArrayOutputStream);

} catch (Exception e) {
e.printStackTrace();
throw e;
}

return byteArrayOutputStream.toByteArray();
}

/**
* 圖片旋轉
* @param bufferedimage bufferedimage
* @param degree 旋轉的角度
* @return BufferedImage
*/
public static BufferedImage rotateImage(final BufferedImage bufferedimage,
final int degree) {
int w = bufferedimage.getWidth();
int h = bufferedimage.getHeight();
Rectangle rect_des = CalcRotatedSize(new Rectangle(new Dimension(
w, h)), degree);
int type = bufferedimage.getColorModel().getTransparency();
BufferedImage img;
Graphics2D graphics2d;
(graphics2d = (img = new BufferedImage(rect_des.width, rect_des.height, type))
.createGraphics()).setRenderingHint(
RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
graphics2d.translate((rect_des.width - w) / 2,
(rect_des.height - h) / 2);
graphics2d.rotate(Math.toRadians(degree), w / 2, h / 2);
graphics2d.drawImage(bufferedimage, 0, 0, null);
graphics2d.dispose();
return img;
}

/**
* 計算旋轉後圖像的大小
* @param src Rectangle
* @param degree 旋轉的角度
* @return Rectangle
*/
public static Rectangle CalcRotatedSize(Rectangle src, int degree) {
if (degree >= 90) {
if(degree / 90 % 2 == 1){
int temp = src.height;
src.height = src.width;
src.width = temp;
}
degree = degree % 90;
}

double r = Math.sqrt(src.height * src.height + src.width * src.width) / 2;
double len = 2 * Math.sin(Math.toRadians(degree) / 2) * r;
double angel_alpha = (Math.PI - Math.toRadians(degree)) / 2;
double angel_dalta_width = Math.atan((double) src.height / src.width);
double angel_dalta_height = Math.atan((double) src.width / src.height);

int len_dalta_width = (int) (len * Math.cos(Math.PI - angel_alpha
- angel_dalta_width));
int len_dalta_height = (int) (len * Math.cos(Math.PI - angel_alpha
- angel_dalta_height));
int des_width = src.width + len_dalta_width * 2;
int des_height = src.height + len_dalta_height * 2;
return new java.awt.Rectangle(new Dimension(des_width, des_height));
}

/**
* byte[] ------>BufferedImage
*
* @param byteImage byteImage
* @return return
* @throws IOException IOException
*/
public static BufferedImage ByteToBufferedImage(byte[] byteImage) throws IOException {
ByteArrayInputStream in = new ByteArrayInputStream(byteImage);
return ImageIO.read(in);
}

/**
* 獲取照片信息的旋轉角度
* @param inputStream 照片的路徑
* @return 角度
*/
public static int getDegree(InputStream inputStream) {
try {
Metadata metadata = ImageMetadataReader.readMetadata(new BufferedInputStream(inputStream),true);
for (Directory directory : metadata.getDirectories()) {
for (Tag tag : directory.getTags()) {
if ("Orientation".equals(tag.getTagName())) {
return turn(getOrientation(tag.getDescription()));
}
}
}
} catch (ImageProcessingException e) {
e.printStackTrace();
return 0;
} catch (IOException e) {
e.printStackTrace();
return 0;
}
return 0;
}

/**
* 獲取旋轉的角度
* @param orientation orientation
* @return 旋轉的角度
*/
public static int turn(int orientation) {
Integer turn = 360;
if (orientation == 0 || orientation == 1) {
turn = 360;
} else if (orientation == 3) {
turn = 180;
} else if (orientation == 6) {
turn = 90;
} else if (orientation == 8) {
turn = 270;
}
return turn;
}

/**
* 根據圖片自帶的旋轉的信息 獲取 orientation
* @param orientation orientation
* @return orientation
*/
public static int getOrientation(String orientation) {
int tag = 0;
if ("Top, left side (Horizontal / normal)".equalsIgnoreCase(orientation)) {
tag = 1;
} else if ("Top, right side (Mirror horizontal)".equalsIgnoreCase(orientation)) {
tag = 2;
} else if ("Bottom, right side (Rotate 180)".equalsIgnoreCase(orientation)) {
tag = 3;
} else if ("Bottom, left side (Mirror vertical)".equalsIgnoreCase(orientation)) {
tag = 4;
} else if ("Left side, top (Mirror horizontal and rotate 270 CW)".equalsIgnoreCase(orientation)) {
tag = 5;
} else if ("Right side, top (Rotate 90 CW)".equalsIgnoreCase(orientation)) {
tag = 6;
} else if ("Right side, bottom (Mirror horizontal and rotate 90 CW)".equalsIgnoreCase(orientation)) {
tag = 7;
} else if ("Left side, bottom (Rotate 270 CW)".equalsIgnoreCase(orientation)) {
tag = 8;
}
return tag;
}
}

『陸』 網頁設計涉及哪些語言

通常說的網頁設計 ,包含美工設計\、 需要學習的語言: html 、css 、js 、jq 等等 網頁設計 也就是網站前端要學習的一些內容。美工設計需要學習的:ps ai 等等 吧 ,反正就是 矢量圖 和點陣圖的 優化和修改的軟體 。不過一個專業的網頁美工 肯定要有美術基礎的 , 不是說 現在很多人 都是 模仿 ,網上截圖 然後摳圖 ,糊弄糊弄 就搞上去了。 看看大型的網站 都是有設計師的 。

『柒』 怎麼蘋果手機下不起飛閃摳圖軟體

因為本身你的手機是不支持的,相對來說系統版本太低了

『捌』 請問用Java 怎樣實現摳圖功能。比如圖片是一塊石頭放在一張紙上,怎樣

1、用ps打開兩張圖片。
2、在工具里選擇「移動工具」,按住滑鼠左鍵把第二個圖片拖動到第一個圖片里。由於第二張的像素有點大,所以會把原來的圖片覆蓋住的,通過滑鼠稍微移動一下。
3、按ctrl+t(自由變換快捷鍵),圖片的四周出現了可以調節的橫線,按住shift拖動圖片的一個角可以進行等比例縮放,這張圖太大了,所以等比例縮小一點。調整為合適的大小,放到合適的地方。調整完畢,按enter鍵確認。
4、在右下角的圖層面板里點擊第三個按鈕(添加矢量蒙板),為第二個圖層添加一個蒙板。
5、可以看到在「工具」里,前景色和背景色默認修改為了白色和黑色。
6、然後選擇工具里的「漸變」工具。可以看到,上方工具欄出現了漸變的一些設置。因為前景色為白色,背景色為黑色,所以默認是白色到黑色的漸變條。後面分別設置為徑向漸變,正常模式,百分之百不透明度,反向不打勾。
7、點擊白色到黑色的漸變條,進入漸變編輯器。
8、把左側下方的白色滑塊拖到中間,可以在下方的位置處直接填寫百分之50。
9、把滑鼠放在左側的滑動條下方,會出現「點按可添加色標」。
10、點擊一下,出現一個新的色塊,為白色。把它拖動到最左邊,可以直接填寫百分之0。
11、選中最左邊的白色色塊,點擊一下下面的顏色後面的白色,彈出「選擇色標顏色」的窗口。在裡面選擇純黑色。點擊「確定」。這樣就把白色改成了黑色。漸變色變成了黑-白-黑。點擊「確定」。
12、可以看到上面確實變成了黑色-白色-黑色漸變。
13、一隻手按住shift鍵,一隻手按住滑鼠左鍵在圖片上拉出一條直線(按住shift鍵是保證水平)。
14、松開手,蒙板就起作用了,這是利用了蒙板狀態下,黑色隱藏,白色顯示的特點。
15、然後稍加修飾。選擇工具里的「矩形選框工具」,選中要裁剪的部分。
16、點擊「圖像」,選擇「裁剪」。
17、圖片被裁剪,裁剪完成後按ctrl+d取消選中狀態,或者可以點擊右鍵,選擇「取消」。
18、、這樣就實現了兩張圖片的合成。利用蒙板和漸變色合成的方式的好處是第二個圖片可以保留一部分的背景,有一種融入的感覺。如果採用摳圖合並的方法,一般是給人物換背景圖,技術要求比較高。

『玖』 UI設計如何入門

1.先學軟體
3如果你是小白,軟體也不會用,那就先學軟體,從PS開始搞起,先看基礎的教程,或者買書,或者看網上的免費的ps教程。
4先掌握一些核心的功能:
5形狀工具和布爾運算(學會做線框圖標,和一些簡單的圖形,比如齒輪啊,坐標,喜歡,等等)
6圖層樣式(可以通過臨摹寫實圖標練習)
7蒙版(做一些遮罩,圖像合成啥的)
8摳圖(鋼筆摳圖,魔術棒等)
9基本的排版(先臨摹界面開始)
10字體的認識(安裝一些字體,學會認識一些常用的字體,一看就知道是啥字體)
11有些東西可以後面在學習(通道,調色,色彩等,處理影樓照片的技術也後面在學習,不急)
12這個時候,先不管做的東西好不好看,先能做出來,操作沒問題要緊。好不好看那是後面的事兒了,第一步要走穩,軟體操作最重要。
13ok,軟體的問題就點到為止了,我也就只有這么幾招了。關鍵還是多練,多動手,多犯錯,多總結。有人帶的話預計1個月可以摸熟PS,AI這2個軟體。
142.
152.提高審美
16此類問題是初學者比較頭疼的問題,錘子科技設計總監羅子雄給的建議有三:
17多看
18為了提高審美,你需要大量去看別人優秀的APP或網頁作品,在Dribbble、Behance、Pinterest等設計網站你可以很容易的找到大量優秀的作品。
19除了UI設計外,平面、攝影、3D、手繪等全球頂級的作品也都可以看到,找到並收藏它們。一段時間後,回顧這些作品,如果發現三個月前收藏的作品很low,恭喜,說明你的審美提高了!
203.當你看過很多優秀的作品後,你可能還是不會設計,所以接下來你要做的就是不斷的練習,第一階段就是臨摹。
21給大家推薦幾款比較有設計感的APP供臨摹練習:《犀牛故事》、《Light》、《想去》,這幾款APP設計都比較簡潔清新,初學者比較容易上手。同時,可以嘗試去學習一些設計規范,例如《iOS人機交互指南》,它是從事UI設計工作者需要掌握的內容,建議仔細讀一讀。
22臨摹幾套作品過後,可以進入第二階段——Redesign。你可以redesign一個自己版本的iOS系統界面,或者重新設計一個微信,加入自己的想法和理念。如果你喜歡玩《陰陽師》,你可以設計個自己版本的陰陽師界面,甚至把裡面的角色換掉都可以。
23學習過程中如果遇到自己解決不了的問題,多網路或google,如果是一個大問題,可以把它拆分成若干小問題,逐個解決掉就好。
244.在看和做的過程中,設計技法只是學習UI的一小部分,更多的是要去理解設計背後的思路和原理。比如,這個產品為什麼定義藍色為主色?為什麼要放大和加粗那個數字?整個頁面的結構和布局是怎樣的?設計的目標有哪些?等等。

『拾』 各位大神java web的問題, 圖片中這種統計效果是怎麼實現的

這個圖可以用bootstrap實現,也可以用谷歌之類公司提供的地圖介面實現,至於統計效果,其實是按地域來算的,不是一整塊的。然後不同數值從高到低用不同的顏色來顯示就可以了!

熱點內容
均線差演算法 發布:2025-02-06 15:13:22 瀏覽:459
androidbrowser 發布:2025-02-06 15:09:49 瀏覽:622
勇敢的心ftp 發布:2025-02-06 15:09:03 瀏覽:327
php日誌分析 發布:2025-02-06 15:08:19 瀏覽:874
36腳本大廳作者 發布:2025-02-06 14:55:53 瀏覽:408
買電腦配送伺服器嗎 發布:2025-02-06 14:54:58 瀏覽:243
伺服器怎麼刪除資源 發布:2025-02-06 14:36:14 瀏覽:672
安卓如何設置桌面返回鍵 發布:2025-02-06 13:58:15 瀏覽:49
bi可視化php 發布:2025-02-06 13:50:15 瀏覽:932
shell寫腳本文件 發布:2025-02-06 13:47:32 瀏覽:231