Git Product home page Git Product logo

jpeg-python's People

Contributors

ghallak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jpeg-python's Issues

1-d dct transform not 2-d

Hi Gaith,
I noticed in your jpeg repo that dct transformation code is not right,
dct_matrix = fftpack.dct(block, norm='ortho')
since the fftpack.dct() function is only 1D DCT instead of 2D DCT as in JPEG compression.
It should be implemented as follows,

def dct2(image):
    return fftpack.dct(fftpack.dct(image.T, norm='ortho').T, norm='ortho')
dct_matrix = dct2(block)

And similar for inverse dct transform..

the output parameter‘s format is what?

i want to know
"parser.add_argument("output", help="path to the output image")", the output parameter‘s format is what?
i set :
input
./原始图像.bmp
output
./yasuo.jpg"
it sent:
usage: encoder.py [-h] input output
encoder.py: error: unrecognized arguments: output ./yasuo.jpg

Error in Encoder: SyntaxError: invalid syntax

When I try to run this: python encoder.py -h ./image.bmp ./output.jpg

it gives me this error:

File "encoder.py", line 60 os.path.dirname(filepath))) from e ^ SyntaxError: invalid syntax

license

Hi @ghallak , could you add an open source license to your code? for example the MIT license? I would like to re-use the code, modify it and make it open.
Thanks

how to use it?

I tried
python encoder.py test.bmp output.txt
then get a 0-1 string content text document

python decoder.py output.txt
then windwos Photos App shows the 90 degrees rotated image.

is this correct?

Thank you and quick comment.

Great code for demonstrating the inner workings of JPEG using an easily interpreted language.
Minor critique - you may wish to include DPCM in your encoding of the DC components. Given how you're already segmenting DC and AC components, the modifications required to the encoder and decoder should be minimal.

Broken jpg and strange decoding

Hey! After encoding, i have broken jpeg. Its HEX contains only 0x31 and 0x30. After decoding i have a very bad image. Help)

Problem with read_huffman_code function

I have some problems with read_huffman_code function in decoder. When the chars end, the function endlessly adds to the prefix '' and the cycle does not end. Can you please explain me what the problem is?

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.