• Show log

    Commit

  • Hash : b0971e47
    Author : DRC
    Date : 2017-06-28T14:47:45

    TurboJPEG: Document xform issue w/ big marker data
    
    If the source image for a transform operation has a lot of EXIF or ICC
    data embedded in it, then it may cause the output image size to exceed
    the worst-case size returned by tjBufSize() (because tjTransform()
    transfers all markers to the output image.)  This is only a problem if
    TJFLAG_NOREALLOC is passed to the function.  Since the TurboJPEG C API
    doesn't require the destination image size to be set in this case, it
    makes the documented assumption that the calling program has allocated
    the destination buffer to exactly the size returned by tjBufSize().
    Changing this assumption would change the API behavior and necessitate
    a new function name (tjTransform2().)  At the moment, it's easier to
    just document this as a known issue, since it's easy to work around in
    the C API.
    
    The Java API is unfortunately a different story, since it must always
    use TJFLAG_NOREALLOC (because, when using the TurboJPEG Java API, all
    buffers are allocated on the Java heap, and thus they can't be
    reallocated by the C code.)  There is no easy way to work around this
    without changing the C API as discussed above, because if the source
    image contains large amounts of marker data, it's virtually impossible
    to determine how big the output image will be.
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/libjpeg-turbo.git
    Git SSH git@git.kmx.io:kc3-lang/libjpeg-turbo.git
    Public access ? public
    Description

    Fork of libjpeg with SIMD

    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg_l thodg
    Tags