Giter Club home page Giter Club logo

ofxrandomimage's Introduction

ofxRandomImage

An addon for openFrameworks to load a random image.

Its purpose is to celebrate randomness in the massive amount of existing image data online.

Screenshot of ofxRandomImage example app

Usage

Before you can use the addon please read the section API keys and make sure they are added to your app.

// ofApp.h

#include "ofxRandomImage.h"

class ofApp : public ofBaseApp{

	//..

	ofxRandomImage randomImage;
	ofImage img;

}
// ofApp.cpp

void setup(){

	randomImage.setup();
	randomImage.loadRandomImage(img);

}

void draw(){

	if(img.isAllocated()){
		img.draw();
	}

}

Sources and methods

It currently supports the following sources:

  • Flickr
    Random images from flickr are retrieved by picking a random number between zero and the ID of the newest image. If no image with this number as its ID exists, the process is repeated. (This can take a view tries)
  • Google Image Search (IN WORK, NOT YET UPLOADED)
    The Google Image Search will adapt the method of Dave Mattsons Random Personal Picture Finder: It creates a random string that has the format used by default in a few different digital cameras. The image search for such a term returns raw and completely random everyday life snapshots.

API keys

In order to use the APIs you need to get API keys. These are the pages where you can get them:

Let the addon know your keys by adding a file called apikeys.xml to the folder bin/data in your app. It should look like this, insert your keys there:

<apikeys>
	<flickr>XXX</flickr>
</apikeys>

Disclaimer

Use this addon at your own risk. The search providers do not own the images found via their search. You must contact the owner of an image and obtain his/her permission in order to use it. Please take care yourself that you do not violate any copyright.

ofxrandomimage's People

Contributors

frauzufall avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lablibertario

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.