-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is an empty package only for compatibility
- Loading branch information
1 parent
1e0ad42
commit c54b3ab
Showing
5 changed files
with
4 additions
and
95 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
c54b3ab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
c54b3ab
There was a problem hiding this comment.
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
c54b3ab
There was a problem hiding this comment.
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.