Solved

How do I open a *.PCX file with VB

Posted on 1998-12-28
13
343 Views
Last Modified: 2012-06-21
Does anyone know how I can open a PCX file using VB?
0
Comment
Question by:Steve2
  • 7
  • 2
  • 2
  • +2
13 Comments
 
LVL 2

Expert Comment

by:polygon
ID: 1452728
you must either find a control to do so, or you must make your own algorithm to do it. You must then know the format PCX files are stored and read then in binary mode.
The PCX file starts with some 128 bytes of info, then the actual pixels and at the end - 768 bytes difining the 256 colors used. Just search the internet for detailed description as I don't want to write it all here.
0
 

Author Comment

by:Steve2
ID: 1452729
Thanks Polygon,

    I have been searching the internet, but I must be looking in all the wrong places because I can't seem to find any information. If anybody knows of anyplace I can either find these tools or information on the algorithim of the PCX file please let me know.

0
 
LVL 4

Expert Comment

by:idcanada
ID: 1452730

You will need to convert PCX to BMP before.
Have a look at http://www.total.net/~idc/
I will post a small sample their that will show you this process.


0
 

Author Comment

by:Steve2
ID: 1452731
The reason I'm trying to learn how to open this format is because of its space saving format. I've tried BMP's, but they start to take up WAYYY too much space after a few. A 44KB PCX file weighs in at about 62KB, I know this may not seem like much of a difference, but when you get a couple hundred rendered beleive me, you need as much space as possible. Thanks just the same though.
0
 

Author Comment

by:Steve2
ID: 1452732
Allow me to correct the spelling errors of my last comment.

The reason I'm trying to learn how to open a PCX file is because of it's small size in comparison to other image formats. I would do my program in BMP's but they begin to take up way too much space. A PCX file I've rendered is 44KB, but the BMP version of that rendering weighs in at about 62KB. Although this may not seem like a biug difference in size, when you have a couple hundred BMP's the size difference does become VERY noticeable. That is the reason for my question.
0
 

Author Comment

by:Steve2
ID: 1452733
Does anyone know of any FREE 3rd party OCX controls that can do this for me?
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 13

Expert Comment

by:Mirkwood
ID: 1452734
Use JPG iso PCX. Much smaller. And viewable in VB
0
 
LVL 4

Accepted Solution

by:
chabaud earned 200 total points
ID: 1452735
Use GIF for 256 colors looseless compressed bitmap
or JPEG for photo bitmap.

This format can be open directly with VB from VB5 (see the Picture property or the LoadPicture() function).


0
 

Author Comment

by:Steve2
ID: 1452736
Yeah thanks, I figured it out a little bit ago myself. I was jsut waiting for someone to answer it because I couldn't figure out how to delete it, good answer!
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1452737
Steve2: Please don't accept answers that has been listed as comments before. If you want to remove a question tell an expert to answer the question.
Chabaud: I already told steve2 to use JPG iso GIF. Please don't answer using another person's comment
0
 
LVL 4

Expert Comment

by:chabaud
ID: 1452738
Sorry mirkwood my "new" answer was for GIF (that don't appear upper).
0
 

Author Comment

by:Steve2
ID: 1452739
Sorry Chabaud I was trying to figure out if there was a way to give points for a comment but I guess there isn't. So I figured it would've been best to delete it, but I didn't know how to go about doing that unless someone answered it. I don't use this Experts Exchange program very much. Once again I apologize and will try not to let it happen in the future.
0
 

Author Comment

by:Steve2
ID: 1452740
I also apologize to you too Mirkwood, I was aware of our comment and it was very helpful, I had just figured it out a day in advance to your comment, and was in the process of figuring out how to delete the question without having an answer, but apparently was unsuccessful.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 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

20 Experts available now in Live!

Get 1:1 Help Now