Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    455
  • comments
    639
  • views
    424263

GTL Part 3.2 : The JPG Quest continues

Sign in to follow this  
_the_phantom_

112 views

The JPG loading code progresses [grin]

I've currently got libjpg playing ball now and I can successfully read all the scan lines from an image and copy them into a local buffer without it crashing or otherwise over running memory, however its not pretty and there is a slight problem.

For some reason the decoded data is only showing up as a green line down one side of the image and the rest is grey. Which says to me i've a slighy copying issue when it comes to reading in the data (although you reading a 4096 bytes at a time and read a scan line at a time into a local buffer the final consumer is only reading 128bytes at a time, thus there is some copying which has to go on).

I'm considering reworking the code so that it reads ALL the day into memory first and then supplies it as series of bytes at a time to the calling function, basically treating the reading as a statefull operation.

It might get around a few issues i've been having and allow me to get things done a bit cleaner, I'll investigate tomorrow I think.
Sign in to follow this  


1 Comment


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!