JuliaIO / JpegTurbo.jl

Julia interface to libjpeg-turbo
MIT License
15 stars 7 forks source link

support abbreviated JPEG data streams #25

Open johnnychen94 opened 2 years ago

johnnychen94 commented 2 years ago

closes #24

using Testimages, JpegTurbo

# both tables and data are Vector{UInt8} bytes
tables, data = jpeg_encode(testimage("lighthouse"); separated_tables=true)

img = jpeg_decode(tables, data)

@tlnagy I'm not familiar with TIFF format -- I played with it a bit and realize that the data is separated into ifd[JPEGTABLES] (the table-only data stream) and data frames. But I don't know how to extract the valid JPEG frame bytes from the file. Can you help put up the JPEG compression support in TIFF images and see what else is needed? Valid JPEG data stream should always start with 0xffd8 and ends with 0xffd9.

Tests and docs are needed.

codecov[bot] commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@33d53e7). Click here to learn what that means. The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #25   +/-   ##
=========================================
  Coverage          ?   67.05%           
=========================================
  Files             ?        5           
  Lines             ?      258           
  Branches          ?        0           
=========================================
  Hits              ?      173           
  Misses            ?       85           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 33d53e7...83ffac3. Read the comment docs.