diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 1fc0614..0000000 --- a/.cirrus.yml +++ /dev/null @@ -1,14 +0,0 @@ -freebsd_instance: - image: freebsd-12-0-release-amd64 -task: - name: FreeBSD - env: - JULIA_VERSION: 1.3 - install_script: - - sh -c "$(fetch https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh -o -)" - build_script: - - cirrusjl build - test_script: - - cirrusjl test - coverage_script: - - cirrusjl coverage codecov diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 84cd833..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: julia -os: - - linux - - osx - - windows -arch: - - amd64 - - x86 - - arm64 -julia: - - 1.3 - - nightly -jobs: - allow_failures: - - julia: nightly - fast_finish: true - exclude: - - os: osx - arch: x86 - - os: osx - arch: arm64 - - os: windows - arch: arm64 - - julia: nightly - arch: arm64 -notifications: - email: false -after_success: julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())' diff --git a/Project.toml b/Project.toml index 4191123..f8f6a11 100644 --- a/Project.toml +++ b/Project.toml @@ -1,15 +1,12 @@ name = "ImageIO" uuid = "82e4d734-157c-48bb-816b-45c225c6df19" authors = ["Ian Butterworth"] -version = "0.1.0" +version = "0.0.1" [deps] -FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -PNGFiles = "f57f5aa1-a3ce-4bc8-8ab9-96f992907883" [compat] -PNGFiles = "0.1" -julia = "^1.3" +julia = "1" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/README.md b/README.md index d08f744..a8a8cb2 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,3 @@ -# PNGFiles.jl +# ImageIO -(work in progress) FileIO.jl integration for PNG files - -[![Build Status](https://travis-ci.com/JuliaIO/PNGFiles.jl.svg?branch=master)](https://travis-ci.com/JuliaIO/PNGFiles.jl) -[![Codecov](https://codecov.io/gh/JuliaIO/PNGFiles.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaIO/PNGFiles.jl) - -## Installation - -Install with Pkg, just like any other registered Julia package: - -```jl -pkg> add PNGFiles # Press ']' to enter te Pkg REPL mode. -``` - -## Usage - -PNGFiles is not yet integrated into FileIO. -For now, you can load png files using: - -```jl -using PNGFiles -PNGFiles.save("path/to/img.png", rand(Gray, 100, 100)) -PNGFiles.load("path/to/img.png") -``` - - -In the future, it will be as simple as: - -```jl -using FileIO -save("test.png", rand(Gray, 100, 100)) -load("test.png") -``` +Julia at least v1.3 is required to really use this package. diff --git a/src/ImageIO.jl b/src/ImageIO.jl index d95132c..74ea7cc 100644 --- a/src/ImageIO.jl +++ b/src/ImageIO.jl @@ -1,18 +1,3 @@ module ImageIO -using FileIO: File, DataFormat - -## PNGs -function load(f::File{DataFormat{:PNG}}; kwargs...) - !isdefined(ImageIO, :PNGFiles) && @eval ImageIO import PNGFiles - return PNGFiles.load(f.filename, kwargs...) -end -function save(f::File{DataFormat{:PNG}}, image::S; kwargs...) where { - T, - S<:Union{AbstractMatrix, AbstractArray{T,3}} - } - !isdefined(ImageIO, :PNGFiles) && @eval ImageIO import PNGFiles - return PNGFiles.save(f.filename, image, kwargs...) -end - end # module