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

6
LINES

< > BotCompany Repo | #1035887 // jpegSize

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

Libraryless. Click here for Pure Java version (91L/1K).

static long jpegSize(BufferedImage img) ctex {
  new JustCountingOutputStream stream;
  // need to drop alpha channel to avoid JDK bug
  ImageIO.write(dropAlphaChannelFromBufferedImage(img), "jpeg", stream);
  ret stream!;
}

Author comment

Began life as a copy of #1007587

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1035887
Snippet name: jpegSize
Eternal ID of this version: #1035887/1
Text MD5: fdf5db0b05ae45013d0f72d09b40ce14
Transpilation MD5: 94b8057e7a2c4cde55103a5880d58993
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-07 00:31:55
Source code size: 229 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 135 / 174
Referenced in: [show references]