Skip to content

First cut of image viewer#51

Merged
mk merged 6 commits into
mainfrom
image-layouts
Jan 21, 2022
Merged

First cut of image viewer#51
mk merged 6 commits into
mainfrom
image-layouts

Conversation

@philippamarkovics

@philippamarkovics philippamarkovics commented Jan 11, 2022

Copy link
Copy Markdown
Member

This adds a default viewer for java.awt.image.BufferedImage that can be easily constructed in the JVM using java.imageio.ImageIO/read. In this iteration, the viewer will look at the dimensions of the image and pick a suitable layout depending on the size and aspect ratio of the image. Customization and captions will be supported in a follow-up.

See https://snapshots.nextjournal.com/clerk/build/7fc947c54f179d266ad7a97228c75b31f99b89e4/index.html#/notebooks/viewers/image.clj about what this first version supports.

CleanShot 2022-01-11 at 14 02 56@2x

CleanShot 2022-01-11 at 14 03 08@2x

CleanShot 2022-01-11 at 14 03 13@2x

CleanShot 2022-01-11 at 14 03 20@2x

CleanShot 2022-01-11 at 14 03 23@2x

@mk mk changed the base branch from main to tailwind-jit January 11, 2022 13:14
@jackrusher

Copy link
Copy Markdown
Collaborator

@joe-loco I particularly like having a good image grid primitive :)

@mk

mk commented Jan 11, 2022

Copy link
Copy Markdown
Member

Love it, look at it! 😻

@mk

mk commented Jan 12, 2022

Copy link
Copy Markdown
Member

I guess another thing we want to support is having the images being the same wider width as the code cells? Not sure if we want to support this in addition to or as a replacement for the content width.

Base automatically changed from tailwind-jit to main January 13, 2022 20:30
@mk mk force-pushed the image-layouts branch 4 times, most recently from c0ef959 to d85caf1 Compare January 13, 2022 21:18
@mk mk changed the title Image Layouts First cut of image viewer Jan 21, 2022
@mk mk merged commit a368c52 into main Jan 21, 2022
@mk mk deleted the image-layouts branch January 21, 2022 14:35
mk added a commit that referenced this pull request Jan 21, 2022
This adds a default viewer for `java.awt.image.BufferedImage` that can be easily constructed in the JVM using `java.imageio.ImageIO/read`. In this iteration, the viewer will look at the dimensions of the image and pick a suitable layout depending on the size and aspect ratio of the image. Customization and captions will be supported in a follow-up.

Co-authored-by: Martin Kavalar <mk@katercalling.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants