Solved

256 color images in C++Builder

Posted on 1998-05-06
2
256 Views
Last Modified: 2010-04-10
   I want to put a 256-color image into a resource file using the Image Editor. When I close it, and then open it again the image is uncolored - it appears like it has 16 colors. Maybe you know a better resource editor?

By the way, how to put an avi animation into an resource file?
0
Comment
Question by:procer
2 Comments
 
LVL 5

Accepted Solution

by:
inter earned 100 total points
ID: 1173549
Hi,
to do the first one the good old Borland's Resource Workshop is my favorite. But if you do not have that you can do it by hand as follows:

Say you have bitmap1.bmp and bitmap2.bmp you want to add your project

prepare a text file called mybitmap.rc and write in:

101 BITMAP "C:\<path to bitmaps>\bitmap1.bmp"
102 BITMAP "C:\<path to bitmaps>\bitmap2.bmp"
etc..
then from dos run the brcc32 (which will be in your bin directory, if there is no path to there write C:\program files\borland\bc3\bin\brcc32 e.g.)
brcc mybitmap.rc
this will create mybitmap.res having 101 and 102 points to your bitmaps. Then add it to your resource statements.

Regarding the 2nd question, I do it as follows:(I do not know how to do as above)
1 - Select the avi file to include
2 - create a custom resource type called AVI (or anything) add the resource from file
3 - Recompile the res
4 - Load the file play it from the resource.
But the above solution may work by just adding
100 AVI1 "c:\myclip.avi"
but I am not sure
Regards,
Igor
0
 

Author Comment

by:procer
ID: 1173550
Thank you very much. You helped me a lot.

Adam.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
thread-safe code in c++ 2 122
Which Linux flavors will this run on? 6 102
C++ help/ Toy problem 19 56
keep track of class structure 1 22
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

730 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