Skip to content

Instantly share code, notes, and snippets.

@ilkerkesen
Created April 3, 2018 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilkerkesen/8b181d55aaae4772b82e5f897f5189cf to your computer and use it in GitHub Desktop.
Save ilkerkesen/8b181d55aaae4772b82e5f897f5189cf to your computer and use it in GitHub Desktop.
luxor image
using Luxor
function make_frame(W, H, images, captions, title="title", fn="drawing.png")
@assert length(images) == length(captions)
nimg = length(images) + 1
width = W*nimg; height = H*nimg
Drawing(width, height, fn)
tiles = Tiler(W,H,1,nimg)
origin()
background("white")
for (i, img, cap) in zip(1:nimg-1, images, captions)
@layer begin
sc = 0.01
image = readpng(img)
w, h = image.width, image.height
w *= 0.2; h *= 0.2
x, y = tiles[i][1].x, tiles[i][1].y
placeimage(image, x, y, .5; centered=true)
scale(sc,sc)
end
end
finish()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment