On Linux and OSX, this should install automatically. If you find
yourself missing most of the images described below, please try
Pkg.build("TestImages"), which should trigger another
attempt to download the standard images.
In case you would like to download other images from the repository
not in the standard set, you can call the
the image name and it will be downloaded from the repository.
On Windows, the
download command, used to download
images from the archives, is not fully supported. You can manually
download the files listed in
deps\build.jl from the
images folder of the
gh-pages branch of this
repository and place them in
img = testimage("cameraman")
The standard test images are downloaded to an
directory inside this package. Any image file stored in this directory
is accessible through the
testimage function. You can
supply the file extension (e.g., ".png", ".tif", etc), but it is not
In case the image is not present locally, the
testimage function will check the online repository and download it for you.
Anyone can contribute images to this repository by submitting a pull request at the github repo. Do check the images for copyright or license issues before submitting.
The following steps should be followed to add an image/imageset to the repository:
git checkout gh-pagesin your local repository folder.
Pkg.dir("TestImages")gives the location of the repo.
images/folder on your machine.
imageFileExtensionsarray in the
git add --allto stage the changes for a commit.
git commit -m "Adds <filename> to the repository from link <link>"
git push <fork> gh-pages
gh-pagesbranch. Once accepted, the image or imageset will be stored at
Now that the images are added to the repository, maintainers will then create a tag
v*-artifacts and release an tarball artifact for this commit. After that we need to modify the source files of the TestImages.jl package to make them available for download.
git checkout masterto return to the master branch.
src/TestImages.jl: Add an entry with the filename to the
[images]section with the newly released artifacts.
git add --allto add the changed source files.
git commit -m "Adds <filename> to package"
git push <fork> master
masterbranch. Once accepted, the image or imageset will be available for download to users of TestImages.jl.