Libraryless. Click here for Pure Java version (5049L/28K).
static BufferedImage scaleBufferedImageToFit(int w, int h default w, BufferedImage img) { int iw = img.getWidth(), ih = img.getHeight(); double imgScale = max(doubleRatio(h, ih), doubleRatio(w, iw)); ret scaleImage(img, imgScale); } static BufferedImage scaleBufferedImageToFit(BufferedImage img, int w, int h default w) { ret scaleBufferedImageToFit(w, h, img); }
Began life as a copy of #1015057
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034222 |
Snippet name: | scaleBufferedImageToFit |
Eternal ID of this version: | #1034222/2 |
Text MD5: | 0abb05c82dc9bde0dfa958485896d7ec |
Transpilation MD5: | ad89bd8e95a20717f18f1fbf2d07e835 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-29 02:38:25 |
Source code size: | 381 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 132 / 208 |
Version history: | 1 change(s) |
Referenced in: | [show references] |