Libraryless. Click here for Pure Java version (4934L/27K).
static int heightForWidth(int w, int h, int newWidth) { ret iround(newWidth*doubleRatio(h, w)); } static int heightForWidth(BufferedImage img, int newWidth) { ret heightForWidth(img.getWidth(), img.getHeight(), newWidth); } static int heightForWidth(int newWidth, BufferedImage img) { ret heightForWidth(img, newWidth); } static int heightForWidth(WidthAndHeight img, int newWidth) { ret heightForWidth(img.getWidth(), img.getHeight(), newWidth); }
Began life as a copy of #1031934
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
| Snippet ID: | #1031963 |
| Snippet name: | heightForWidth |
| Eternal ID of this version: | #1031963/3 |
| Text MD5: | 89b9e3536f8f32df37b5e33cf9cdd482 |
| Transpilation MD5: | 2459f0e1c79cd85b8b458dc2858d99a6 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-12-26 18:38:48 |
| Source code size: | 477 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 435 / 610 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |