Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TImage and gif files

Status
Not open for further replies.

dakkarin

Instructor
Nov 11, 2005
76
0
0
TR
Hi im designing a program which will take any kind of image and put it into database a part of my program is like this


Graphics::TBitmap *bitmap = new Graphics::TBitmap();

Image1->Picture->LoadFromFile(OpenDialog1>FileName);
bitmap->Assign(Image1->Picture->Graphic);
DBImage1->Picture->Bitmap = bitmap;

it works with jpg files but it doesn work with the gif files what must i do to fix it
Thanks

Liars Do Not Fear The Truth If There Are Enough Liars
 
If all you're doing is storing the file contents in a database, then the file format is irrelevant, all you need do is read the binary file into a blob field.

However, it looks like you want to display the picture as well. TImage and TDBImage don't support GIF natively (presumably because of the now-expired patent, which required royalty payments), but there are third-party VCL components that do; a search for TGIFImage will produce results.
 
yes i want to show it also
but i couldnt find TGIFImage in any site for borland c++5 its all for delphi and upto borland 4
what should i do?
where can i find?

Liars Do Not Fear The Truth If There Are Enough Liars
 
I've no idea; I just did a Google search and found references to TGIFImage.

Another approach you might be able to try is to convert your GIF files into either a Borland-supported format like BMP, or a more modern format like PNG, for which you might be able to use TPNGImage.
 
I just need to use that TGIFImage component is there anyway to be able to use the compiled package for borland c++ 4 use for borland c++ 5
or does anyone know any other way to show the gif image in a TImage file

Liars Do Not Fear The Truth If There Are Enough Liars
 
any idea?

Liars Do Not Fear The Truth If There Are Enough Liars
 
I've found one for BCB 3. I suspect you would have to modify it to work with BCB5 even if the newer VCL would work with it.


James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
how can i modify it to work with bcb 5.0 i tried but i couldnt succeed do you know anything about it

Liars Do Not Fear The Truth If There Are Enough Liars
 
Sorry, I don't.

James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
If the source code is available, then you could re-build it for BCB5.
 
no source code is not available
isnt there any other way to show a gif image in TImage component?

Liars Do Not Fear The Truth If There Are Enough Liars
 
Thanks but every file in this site is for delphi where can i find the c++ versions

Liars Do Not Fear The Truth If There Are Enough Liars
 
Does anyone know how can i convert dfm files to bpr files
is there anyway to do this?

Liars Do Not Fear The Truth If There Are Enough Liars
 
A dfm file represents a form, a bpr represents a project. You can't convert between the two.
 
i have theese file extensions under the delphi project
.dfm .pas .res .dpr
isnt there anyway to convert this project to c++

Liars Do Not Fear The Truth If There Are Enough Liars
 
The dpr file is the project file, equivalent to bpr. It could probably be easily converted to bpr using a text editor. The pas file is Pascal; you could also convert that, but I think you can include Pascal files in C++Builder projects. The dfm and res files should be same in both systems.
 
how can i convert it then?

Liars Do Not Fear The Truth If There Are Enough Liars
 
any idea?

Liars Do Not Fear The Truth If There Are Enough Liars
 
doesnt anyone have any idea about
what must i use for using gif images in TImage component
every component on the net is for delphi
what must i do?

Liars Do Not Fear The Truth If There Are Enough Liars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top