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

13
LINES

< > BotCompany Repo | #1019196 // mergeRGBImagesAndRects_scaledToWidth

JavaX fragment (include)

1  
static BufferedImage mergeRGBImagesAndRects_scaledToWidth(L<RGBImageAndRect> l, int width) {
2  
  new L<BufferedImage> images;
3  
  for (RGBImageAndRect i : l) {
4  
    BufferedImage img2 = toBufferedImage(i.image);
5  
    BufferedImage img3 = scaleImage_noSmooth(img2, doubleRatio(width, i.image.getWidth()));
6  
    if (i.rect != null) {
7  
      Rect face3 = rescaleRect_imageToImage(i.rect, img2, img3);
8  
      drawRect(img3, face3, Color.white);
9  
    }
10  
    images.add(img3);
11  
  }
12  
  ret mergeBufferedImagesVertically(images);
13  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019196
Snippet name: mergeRGBImagesAndRects_scaledToWidth
Eternal ID of this version: #1019196/3
Text MD5: 08616fc2478565fcdd35bfea81af74fa
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-27 14:51:05
Source code size: 522 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 355 / 377
Version history: 2 change(s)
Referenced in: [show references]