Giter Site home page Giter Site logo

agileadam / dummyimage Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 116 KB

Uses http://dummyimage.com to retrieve a set of placeholder images. You tell the script how many images to generate, the minimum and maximum dimensions, what the title overlay should be, and what filetype to generate (png, jpg, gif), and the script creates uniquely colored, sized, and labeled placeholder images. You can also choose to automatically include the dimensions in the title overlay.

Python 100.00%

dummyimage's Introduction

dummyimage

Uses http://dummyimage.com to retrieve a set of placeholder images. You tell the script how many images to generate, the minimum and maximum dimensions, what the title overlay should be, and what filetype to generate (png, jpg, gif), and the script creates uniquely colored, sized, and labeled placeholder images. You can also choose to automatically include the dimensions in the title overlay.

Tips

  • If you need images that are at an exact dimension, use the same min/max values. (e.g., --min 100x100 --max 100x100)
  • You can generate a single image using -n 1

Usage

Please run python dummyimage.py -h to see the usage syntax and possible options.

All options

$ python dummyimage.py -i -t jpg -d ~/Desktop/result/ --min 100x200 --max 300x400 -n 3 -p "Slide Example"
Retrieving 1 of 3 : http://dummyimage.com/281x385/77542A/6AB049.jpg&text=Slide+Example+1+281×385
Retrieving 2 of 3 : http://dummyimage.com/236x205/DE0C7B/7B6BC8.jpg&text=Slide+Example+2+236×205
Retrieving 3 of 3 : http://dummyimage.com/122x389/75FF05/934B3C.jpg&text=Slide+Example+3+122×389

Only required options

$ python dummyimage.py -d ~/Desktop/result/ --min 100x200 --max 300x400 -n 3 -p "Slide"
Retrieving 1 of 3 : http://dummyimage.com/132x363/FA7AC5/05A9E7.png&text=Slide+1
Retrieving 2 of 3 : http://dummyimage.com/155x264/522D6A/F38EB8.png&text=Slide+2
Retrieving 3 of 3 : http://dummyimage.com/121x272/F3F9B7/B7DC24.png&text=Slide+3

Todo

  1. Improve readability: foreground and background colors can be too similar on occasion.
  2. Error checking

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.