Skip to content

Commit

Permalink
ImageIO v0.0.1
Browse files Browse the repository at this point in the history
This is an empty package only for compatibility
  • Loading branch information
johnnychen94 committed May 22, 2021
1 parent 1e0ad42 commit c54b3ab
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 95 deletions.
14 changes: 0 additions & 14 deletions .cirrus.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

7 changes: 2 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
35 changes: 2 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
15 changes: 0 additions & 15 deletions src/ImageIO.jl
Original file line number Diff line number Diff line change
@@ -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

3 comments on commit c54b3ab

@johnnychen94
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: Version 0.0.1 less than least existing version 0.1.0

@johnnychen94
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright... I think I'll manually submit a patch to the General registry.

Please sign in to comment.