Solved

How do you load a PCX the Fast Way

Posted on 1997-05-31
2
221 Views
Last Modified: 2010-04-10
I am currently loading a pcx but by doing a byte by byte way and plotting it on the screen then I started using a virtual screen, but still I did not want the long pause of blackness during the loading of the pcx.  

Is there a way to read word by word or even better double word.
0
Comment
Question by:kane020397
2 Comments
 
LVL 3

Accepted Solution

by:
byang earned 90 total points
ID: 1163781
You can read it line by line. Since you know the width of the image from the header, you know the maximum possible compressed line size, which is 2 times the width assuming no compression is possible.

The fastest way is to read the entire file into a memory buffer in one shot, the write an assembler routine to decode it.
0
 

Author Comment

by:kane020397
ID: 1163782
I was expecting more of a errmmm..... Faster method like the one the use in games such as jazz jack rabbit etc....

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now