I have a file that have .bin extension and i need to convert it into .bmp code. Can any body provide me the exact code for this type of conversion.
Satish Chilukuri
Ranch Hand
Joined: Jun 23, 2005
Posts: 266
posted
0
.bin files are generally CD/DVD images. Is that the kind of file you have?
swati mittal
Ranch Hand
Joined: Oct 21, 2008
Posts: 39
posted
0
Actually right now i do not have binary file. If we assume that it is a video or image then provide me solution according to that.
Satish Chilukuri
Ranch Hand
Joined: Jun 23, 2005
Posts: 266
posted
0
Without knowing the file type, there is no way to do any conversion. I still don't understand what you mean convert to a bitmap file. Are there images like .jpg, .png in the .bin file and you need to convert them to bmp format? If it is a video file how are you going to convert it a bmp file? Do you mean to extract individual frames and save them as bmp?
swati mittal
Ranch Hand
Joined: Oct 21, 2008
Posts: 39
posted
0
I have a 10-15 .bin files that are the frames generated from a video. Now i need to write down a code that will change that files into .bmp files. Please help me soon.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35240
7
posted
0
There are many ways to store an image in a file. As Satish mentions, without knowing which format the images are in, we can't give advice on how to convert them.
I dont know about the header-footer of image. Please provide me any sample code for .bin to .bmp conversion. I am using AIR technology that is responsible to create frames and store them into .bin file.
swati mittal
Ranch Hand
Joined: Oct 21, 2008
Posts: 39
posted
0
Can any body convert this c# code into java. (This code is converting .bin file into .bmp)
swati mittal
Ranch Hand
Joined: Oct 21, 2008
Posts: 39
posted
0
format -- PixelFormat.Format32bppArgb
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
9
posted
0
Originally posted by swati mittal: Can any body convert this c# code into java.
NotACodeMill Why don't you have a go and then let us know if you get stuck anywhere.
Joanne
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32654
4
posted
0
Originally posted by swati mittal: Can any body convert this c# code into java.
I am willing to convert that bit to Java. It readsYou ought to be able to convert the rest of the code without a lot of effort; remember C# and Java are very similar. You will have to alter some of the names of classes, lose the "using" keyword, and in Java Thread.sleep() declares a checked Exception, but the whole job ought not to be too difficult.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32654
4
posted
0
Originally posted by Campbell Ritchie: I am willing to convert that bit to Java. It reads[CODE]
Sorry, I made a mistake. It should read data.length not data.Length.
swati mittal
Ranch Hand
Joined: Oct 21, 2008
Posts: 39
posted
0
C# code is using class "BitmapData". But java does not contain any class which can work like BitmapData.
swati mittal
Ranch Hand
Joined: Oct 21, 2008
Posts: 39
posted
0
At last I am able to convert my .bin file into .bmp file. This is the code --
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32654
4
posted
0
Well done. ( ) C# code really looks like Java code, doesn't it.
swati mittal
Ranch Hand
Joined: Oct 21, 2008
Posts: 39
posted
0
yes it looks like a java. But I faced lot of problems because some classes are available in C# but not in java.