Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

6
LINES

< > BotCompany Repo | #1024313 // resizeImageOnServer_percent_jpeg [creates new JPEG on server, returns URL]

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5142L/35K).

1  
sS resizeImageOnServer_percent_jpeg(S imageID, double percent) {
2  
  BufferedImage img1 = loadImage2(imageID);
3  
  BufferedImage img = resizeImage(img1, iround(img1.getWidth()*percent/100));
4  
  S title = getSnippetTitle(imageID) + " [" + img.getWidth() + "*" + img.getHeight() + "]";
5  
  ret uploadJPEGToImageServer(title, img);
6  
}

Author comment

Began life as a copy of #1023956

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024313
Snippet name: resizeImageOnServer_percent_jpeg [creates new JPEG on server, returns URL]
Eternal ID of this version: #1024313/3
Text MD5: 1051eddea9315763910604a56c019110
Transpilation MD5: 603594d9dd085ca732bd151d11144a43
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-01 21:10:03
Source code size: 328 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 221 / 336
Version history: 2 change(s)
Referenced in: [show references]