Skip to content

Commit 60755a9

Browse files
committed
feat: also print JpegTurbo.jl version in versioninfo
1 parent 39cef55 commit 60755a9

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
88
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
99
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
1010
JpegTurbo_jll = "aacddb02-875f-59d6-b918-886e6ef4fbf8"
11+
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
1112

1213
[compat]
1314
CEnum = "0.3, 0.4"

src/JpegTurbo.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module JpegTurbo
22

33
using ImageCore
4+
using TOML
5+
const project_info = TOML.parsefile(joinpath(@__DIR__, "..", "Project.toml"))
46

57
include("../lib/LibJpeg.jl")
68
using .LibJpeg

src/libjpeg_utils.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"""
2-
versioninfo()
2+
versioninfo(io=stdout)
33
44
Print information about the libjpeg-turbo in use.
55
"""
6-
function versioninfo()
7-
println("libjpeg version: ", LibJpeg.JPEG_LIB_VERSION)
8-
println("libjpeg-turbo version: ", LibJpeg.LIBJPEG_TURBO_VERSION)
9-
println("bit mode: ", LibJpeg.BITS_IN_JSAMPLE)
10-
println("SIMD: ", LibJpeg.WITH_SIMD == 1 ? "enabled" : "disabled")
6+
function versioninfo(io=stdout)
7+
println(io, "JpegTurbo.jl version: ", project_info["version"])
8+
println(io, "libjpeg version: ", LibJpeg.JPEG_LIB_VERSION)
9+
println(io, "libjpeg-turbo version: ", LibJpeg.LIBJPEG_TURBO_VERSION)
10+
println(io, "bit mode: ", LibJpeg.BITS_IN_JSAMPLE)
11+
println(io, "SIMD: ", LibJpeg.WITH_SIMD == 1 ? "enabled" : "disabled")
1112
end

0 commit comments

Comments
 (0)