Coder Social home page Coder Social logo

jpeg-compressor's People

Watchers

 avatar

jpeg-compressor's Issues

Decoder RGB scanline coping type


jpgd.cpp, line 3101 should be:
if (((req_comps == 1) && (decoder.get_num_components() == 1)) || ((req_comps == 
3) && (decoder.get_num_components() == 3)))


Original issue reported on code.google.com by [email protected] on 13 Mar 2014 at 7:25

patch to reduce dynamic memory allocations:


Here is a patch to reduce dynamic memory allocations:
http://pastebin.com/hvDpcKn4

It is described here:
http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/

Not very well tested, but it might be useful.

Original issue reported on code.google.com by erwin.coumans on 6 Apr 2011 at 7:23

JPGD_UNEXPECTED_MARKER & M_RST7 failing on the Nexus 4

What steps will reproduce the problem?
1. Only happens in the Nexus 4 device. (Android 4.3)

2. When taking a JPEG picture, the JPEG data is passed for decompression into 
the method: decompress_jpeg_image_from_memory method

What is the expected output? What do you see instead?

Decoding fails. Debugging the library I've found that the error code is 
"JPGD_UNEXPECTED_MARKER", and the marker itself that seems to make it fail is 
"M_RST7"


Original issue reported on code.google.com by [email protected] on 27 Jan 2014 at 5:44

Double free in compress_image_to_jpeg_file

What steps will reproduce the problem?

   jpge::params params;
   params.m_quality = 95;
   params.m_subsampling = jpge::H2V1;

   compress_image_to_jpeg_file("test.jpg", width, height, 3, image, params);

What is the expected output? What do you see instead?

Expect to write test.jpg. Writes the file correctly but crashes.
Program received signal SIGABRT, Aborted.
0xb7fdf424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fdf424 in __kernel_vsyscall ()
#1  0xb6d16c8f in __GI_raise (sig=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0xb6d1a2b5 in __GI_abort () at abort.c:92
#3  0xb6d4cdfc in __libc_message (do_abort=2, 
    fmt=0xb6e26080 "*** glibc detected *** %s: %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#4  0xb6d57bc2 in malloc_printerr (action=<optimized out>, str=<optimized out>, 
ptr=0x85c62d0)
    at malloc.c:6283
#5  0xb6d58862 in _int_free (av=0xb6e62400, p=0x85c62c8) at malloc.c:4795
#6  0xb6d5b94d in __GI___libc_free (mem=0x85c62d0) at malloc.c:3738
#7  0xb6d470b4 in _IO_new_fclose (fp=0x85c62d0) at iofclose.c:88
#8  0x080ce2ce in jpge::cfile_stream::close (this=0xbfffaea8)
    at gLucifer/Viewer/src/jpeg/jpge.cpp:923
#9  0x080ce1dc in jpge::cfile_stream::~cfile_stream (this=0xbfffaea8, 
__in_chrg=<optimized out>)
    at gLucifer/Viewer/src/jpeg/jpge.cpp:908
#10 0x080cde0b in jpge::compress_image_to_jpeg_file (pFilename=0x815c070 
"test.jpg", width=800, 
    height=600, num_channels=3, pImage_data=0xaff60008 "", comp_params=...)
    at Viewer/src/jpeg/jpge.cpp:946

What version of the product are you using? On what operating system?
jpge 1.03, Ubuntu 11.10

Please provide any additional information below.

If I edit the cfile_stream.close() method in jpge.cpp by inserting
      m_pFile = NULL;   //Prevent double close
at line 928 it works fine.

Original issue reported on code.google.com by [email protected] on 8 Nov 2011 at 12:49

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.