All Projects â†’ pbs â†’ Its

pbs / Its

Licence: mit
image transformation service

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Its

Gophericons
34 gopher images for Go developers community
Stars: ✭ 578 (+1964.29%)
Mutual labels:  images
Chafa
📺🗿 Terminal graphics for the 21st century.
Stars: ✭ 774 (+2664.29%)
Mutual labels:  images
Imgix.js
Responsive images in the browser, simplified
Stars: ✭ 922 (+3192.86%)
Mutual labels:  images
Videoshow
Simple node.js utility to create video slideshows from images with optional audio and visual effects using ffmpeg
Stars: ✭ 618 (+2107.14%)
Mutual labels:  images
Vanilla Lazyload
LazyLoad is a lightweight, flexible script that speeds up your website by deferring the loading of your below-the-fold images, backgrounds, videos, iframes and scripts to when they will enter the viewport. Written in plain "vanilla" JavaScript, it leverages IntersectionObserver, supports responsive images and enables native lazy loading.
Stars: ✭ 6,596 (+23457.14%)
Mutual labels:  images
Alchemy
🔮 File conversion, all from the menu bar
Stars: ✭ 815 (+2810.71%)
Mutual labels:  images
React Grid Gallery
Justified image gallery component for React
Stars: ✭ 571 (+1939.29%)
Mutual labels:  images
Cometa
Super fast, on-demand and on-the-fly, image processing.
Stars: ✭ 8 (-71.43%)
Mutual labels:  images
Garbro
Visual Novels resource browser
Stars: ✭ 764 (+2628.57%)
Mutual labels:  images
Imgix Swift
A Swift client library for generating URLs with imgix
Stars: ✭ 19 (-32.14%)
Mutual labels:  images
Oblique
With Oblique explore new styles of displaying images
Stars: ✭ 633 (+2160.71%)
Mutual labels:  images
Ueberzug
ueberzug is a command line util which allows to display images in combination with X11
Stars: ✭ 711 (+2439.29%)
Mutual labels:  images
React Native Cached Image
CachedImage component for react-native
Stars: ✭ 890 (+3078.57%)
Mutual labels:  images
React Native Image Gallery
Pure JavaScript image gallery component for iOS and Android with high-performance and native feeling in mind
Stars: ✭ 601 (+2046.43%)
Mutual labels:  images
Python Compare Images
This repository is mainly about comparing two images. The technique used is SSIM. i.e. Structural Similarity Index Measure We use some of the inbuilt functions available in python's skimage library to measure the SSIM value. Along with SSIM we also measure the MSE ( Mean Square Error ) To know more about the SSIM technique Refer Here: https://en.wikipedia.org/wiki/Structural_similarity
Stars: ✭ 25 (-10.71%)
Mutual labels:  images
Pictshare
📷 PictShare is an open source image, mp4, pastebin hosting service with a simple resizing and upload API that you can host yourself. 🎑
Stars: ✭ 576 (+1957.14%)
Mutual labels:  images
Kroki
Creates diagrams from textual descriptions!
Stars: ✭ 774 (+2664.29%)
Mutual labels:  images
Lozad.js
🔥 Highly performant, light ~1kb and configurable lazy loader in pure JS with no dependencies for responsive images, iframes and more
Stars: ✭ 6,932 (+24657.14%)
Mutual labels:  images
Sv Images
Image manipulation library with an HTTP based API.
Stars: ✭ 7 (-75%)
Mutual labels:  images
Image
A PHP library to handle images
Stars: ✭ 898 (+3107.14%)
Mutual labels:  images

Stability

Warning: under active development

This application is under active development and likely to change further before stabilizing.

Image Transformation Service

ITS (Image Transform Service) performs transformations and optimizations on images by accepting transform requests in the form of query strings.


Crop

There are three varieties of crop -- default, focal and smart crop.

Crop (Default)

The default crops the input image about the center of the image. The image will be resized down first, depending on the lesser dimension of the image.

To use this crop, use the crop keyword with two arguments split by x's:

https://image.pbs.org/path/to/file.jpg?crop=WWxHH

Where:

  • crop -- indicates that ITS should perform a crop and use the middle of the image as the focal point for the crop.
  • WW -- a numerical pixel value representing the desired width of the output image
  • HH -- a numerical pixel value representing the desired height of the output image

Example

Original Image:

https://image.pbs.org/video-assets/5jJewwH-asset-mezzanine-16x9-esGHBDK.png

A Chocolate Cake

Applying crop:

https://image.pbs.org/video-assets/5jJewwH-asset-mezzanine-16x9-esGHBDK.png?crop=700x200

A Cropped Chocolate Cake

Focal crop

Focal crop returns an image focused around a user-specified point in the original image of a user-specified size. To use this crop, utilize the crop keyword with four arguments split by x's:

https://image.pbs.org/path/to/file.jpg?crop=WWxHHxXXxYY

Where:

  • crop -- indicates that ITS should perform a crop
  • WW -- a numerical pixel value representing the desired width of the output image
  • HH -- a numerical pixel value representing the desired height of the output image
  • XX -- the x axis of the focal point, represented as a percentage value of the width of the original picture
  • YY -- the y axis of the focal point, represented as a percentage value of the height of the original picture

Example

Original Image:

https://image.pbs.org/test/GmtpBa4-asset-mezzanine-16x9-Uu2CpNc.png

A Key Lime Pie

Applying crop with four parameters:

https://image.pbs.org/test/GmtpBa4-asset-mezzanine-16x9-Uu2CpNc.png?crop=500x400x90x10

A cropped Key Lime pie

Smart Crop

Smart crop returns an image focused around a user-specified point in the original image of a user-specified size. To use this crop, the input image filename must end in _focus-XXxYY.ext, and then you can use the crop keyword with two arguments split by x's:

https://image.pbs.org/path/to/file_focus-XXxYY.ext?crop=WWxHH

Where:

  • XX -- the x axis of the focal point, represented as a percentage value of the height of the original picture
  • YY -- the y axis of the focal point, represented as a percentage value of the height of the original picture
  • crop -- indicates that ITS should perform a crop
  • WW -- a numerical pixel value representing the desired width of the output image
  • HH -- a numerical pixel value representing the desired height of the output image

Example

Original Image:

https://image.pbs.org/test/Sjk2Eqs-asset-mezzanine-16x9-0gsKw4z_focus-90x10.png

A hand holding a knife that is cutting bread

Applying crop:

https://image.pbs.org/test/Sjk2Eqs-asset-mezzanine-16x9-0gsKw4z_focus-90x10.png?crop=300x400

A hand holding a knife that is cutting bread


Overlay

Overlay returns the input image with the specified overlay image placed on top of it. The overlay is placed in the top left corner. To use overlay, use the overlay keyword:

API_URL/<file_path/filename.ext>?overlay=<overlay_img_path>

Where:

  • overlay -- indicates that ITS should put an overlay on the input image
  • overlay_img_path -- path to the overlay (optionally, can be a keyword a keyword in the OVERLAYS dictionary in settings)

Resize

Resize returns a resized version of the original image without distortion of the aspect ratio. To use it, use the resize keyword with two arguments split by x's:

https://image.pbs.org/path/to/file.jpg?resize=WWxHH

Where:

  • resize -- indicates that ITS should perform a resize transform
  • WW -- a numerical pixel value representing the desired width of the output image
  • HH -- a numerical pixel value representing the desired height of the output image

Resize has an option to not scale up, if the provided width and/or height is larger than those of the image. Use the resize keyword, but add a comma and a third argument no-scale-up:

https://image.pbs.org/path/to/file.jpg?resize=WWxHH,no-scale-up

Or, with missing height:

https://image.pbs.org/path/to/file.jpg?resize=WWx,no-scale-up

Or, with missing width:

https://image.pbs.org/path/to/file.jpg?resize=xHH,no-scale-up

Note: Resizing to a larger size isn’t recommended, as it will compromise image quality.

Note: Inputing a single value (either an expected width size or an expected height size followed by an 'x') is also supported.

Example

Original Image:

https://image.pbs.org/video-assets/GTdD9Rq-asset-mezzanine-16x9-d3h7qCm.jpg

A flowery cake

With resize applied:

https://image.pbs.org/video-assets/GTdD9Rq-asset-mezzanine-16x9-d3h7qCm.jpg?resize=400x200

A resized flowery cake

With resize applied and only a width supplied:

https://image.pbs.org/video-assets/GTdD9Rq-asset-mezzanine-16x9-d3h7qCm.jpg?resize=400x

A resized flowery cake


Format

Format returns the input image in the specified type, rather than being left as the original image’s type. It currently supports conversion to JPG, PNG, and WEBP. To use it, use the format keyword with the file extension as an argument:

https://image.pbs.org/path/to/file.jpg?format=ext&quality=

Where:

  • format -- indicates that ITS should perform a format transform
  • ext -- the requested output type. Can only be jpg, png, webp or auto (auto will examine the image and return either a jpg or png depending on the image's complexity)
  • quality -- optional, allows user to specify the quality that they would like the output image to have. Currently, this parameter only works with the jpg format. Accepts a multiple 10 up to 100.

Example

Original Image:

https://image.pbs.org/test/7Sy3rBL-asset-mezzanine-16x9-xMYNIn3.jpg

Macaroons

Image as a PNG:

https://image.pbs.org/test/7Sy3rBL-asset-mezzanine-16x9-xMYNIn3.jpg?format=png

Macaroons

Image as a JPG with a quality of 20:

https://image.pbs.org/test/7Sy3rBL-asset-mezzanine-16x9-xMYNIn3.jpg?quality=20

Macaroons


Blur

Blur returns an image subject to a Gaussian Blur. To use it, use the blur keyword with an integer (for the pixel radius of the blur) as an argument:

https://image.pbs.org/path/to/file.jpg?blur=radius

Where:

  • blur -- indicates that ITS should perform a blur transform
  • radius -- an integer pixel value representing the desired radius of the blur effect

Example

Original Image:

https://image.pbs.org/test/7Sy3rBL-asset-mezzanine-16x9-xMYNIn3.jpg

Macaroons

Blurred Image:

https://image.pbs.org/test/7Sy3rBL-asset-mezzanine-16x9-xMYNIn3.jpg?blur=10

Macaroons


Combination

All of the transforms described above can be combined into one query by separating them with &.

An image cropped to 600x300px, changed to a PNG:

https://image.pbs.org/test/nBVLq44-asset-mezzanine-16x9-p0bSjVY.jpg?crop=600x300&format=png

A fancy cake


Development

Here are some commands you can run while developing locally.

Run tests:

docker-compose build server
docker-compose run server pipenv run pytest its/tests

Run development server:

docker-compose up --build

Run autoformatter for python code:

docker-compose run server ./scripts/docker/server/format.sh

Run static type checking:

docker-compose run server ./scripts/docker/server/type-check.sh

Apply autogenerated type annotations:

docker-compose run server pipenv run pyannotate --write --type-info ./type_info.json its/path_to_file.py

Build and publish docker image

Note: you have to authenticate to Docker Hub first.

./scripts/do publish
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].