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

5
LINES

< > BotCompany Repo | #1035755 // megapixels

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

Libraryless. Click here for Pure Java version (9212L/52K).

meta-for I as BufferedImage, WidthAndHeight {
  static double megapixels(I img) {
    ret img == null ? 0 : area(imageSize(img))/1_000_000.0;
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035755
Snippet name: megapixels
Eternal ID of this version: #1035755/1
Text MD5: b14d98317f7171ccfd1b01b20a58c135
Transpilation MD5: 4a0e7a7365a35c36c109fc8f33659de0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-07-19 23:49:19
Source code size: 151 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 128 / 184
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1035901 - str_megapixels