Giter Club home page Giter Club logo

micro-jpeg-visualizer's People

Contributors

aguaviva avatar raulamd avatar windlessstorm 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

Watchers

 avatar  avatar  avatar

micro-jpeg-visualizer's Issues

struct.error: unpack requires a string argument of length 64

Running the script gives the following output:

Traceback (most recent call last):
  File "micro-jpeg-visualizer.py", line 282, in <module>
    j.decode(open('images/porsche.jpg', 'r').read())
  File "micro-jpeg-visualizer.py", line 262, in decode
    self.DefineQuantizationTables(chunk)
  File "micro-jpeg-visualizer.py", line 214, in DefineQuantizationTables
    self.quant[hdr & 0xf] =  GetArray("B", data[1:1+64],64)
  File "micro-jpeg-visualizer.py", line 36, in GetArray
    return      list(unpack(s,l[:length]))
struct.error: unpack requires a string argument of length 64


Python version using: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 
32 bit (Intel)] on win
32


Original issue reported on code.google.com by [email protected] on 5 Jan 2012 at 11:47

No license given

Hi. Would you mind adding a license to your code? (something liberal, such as CC-0 or MIT license would be great)

unsupported operand type(s) for >>: 'str' and 'int'

Problem:

Getting type mismatch error when trying to run it.

Traceback (most recent call last): File "micro-jpeg-visualizer.py", line 280, in <module> jpeg().decode(open('images/porsche.jpg', 'rb').read()) File "micro-jpeg-visualizer.py", line 267, in decode lenchunk = self.StartOfScan(data, lenchunk) File "micro-jpeg-visualizer.py", line 204, in StartOfScan matL, oldlumdccoeff = self.BuildMatrix(st,0, self.quant[self.quantMapping[0]], oldlumdccoeff) File "micro-jpeg-visualizer.py", line 173, in BuildMatrix code = self.tables[0+idx].GetCode(st) File "micro-jpeg-visualizer.py", line 156, in GetCode res = self.Find(st) File "micro-jpeg-visualizer.py", line 151, in Find r=r[st.GetBit()] File "micro-jpeg-visualizer.py", line 112, in GetBit return (b >> s) & 1 TypeError: unsupported operand type(s) for >>: 'str' and 'int'

Setup:

Windows 10
Python 3.6

Status enquiry

Is this repo accepting pull requests? I have expanded the code to work for various chroma subsampling also. Initially it was working for 1x1 only but now I can make it work for 1x2, 2x1 and 2x2 also.

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.