Jump to content






Photo - - - - -

.bin To .iso Converting In Linux



Overview:
Here i made a front-end tool for bchunk that will convert an .bin image to .iso
This tool will automatically generate a .cue file that will contain the track layout information
The cmd-line bchunk requires a .cue file to make this conversion
In that case where the .cue is missing there will be no problem , this script will automatically generate the information for .cue file .

Must install python-tk and bchunk first

#!/usr/bin/python
#Date:22.01.2011
#Purpose: Convert .bin to .iso ,command-line front-end tool
#Author: pyth0n3
#Blog: http://pyth0n3.blogspot.com/

import os 
import Tkinter 
from Tkinter import * 
import tkMessageBox
import tkFileDialog,Tkconstants,collections 

root =Tk() 

def about():
 tkMessageBox.showinfo(title=" Info: ", \
 message="Convert .bin images to .iso\n \
 Contact: python3aka@gmail.com ")

def callback():
 file_path = tkFileDialog.askopenfilename(title="Open image", filetypes=[("bin image",".bin"),("All files",".*")])
 
 tkMessageBox.showinfo( "Info:", "This may take a while depends on image size \
 Please press the OK button to start processing ...")
 image  =  file_path.split('/')[-1]
 filename  = "/tmp/image.cue"
 file = open(filename,"w")
 file.write("FILE "+image+ " BINARY\n" )
 file.write("TRACK 01 MODE1/2352\n" )
 file.write("INDEX 01 00:00:00" )
 file.close()

 var = 'bchunk -v ' + file_path +' '+filename + ' out'
 cmd = var
 os.system(cmd) 
 tkMessageBox.showinfo( "finish", "Image converted succesfull")

root.title('BIN TO ISO')

root["padx"] = 40
root["pady"] = 20 
textFrame = Frame(root)

Button(root, text='Open image to process',fg='green', 
bg='black',command=callback).pack(side= LEFT,padx=10,pady=10)
Button(root, text='Exit',fg='green',bg='black',command=quit).pack(side= RIGHT,padx=10,pady=10)
Button(root, text='About',fg='green',bg='black',command=about).pack(side= RIGHT,padx=10,pady=10)

root.mainloop()


#END



Screenshot:
Posted Image
_____________________________
Contact: python3aka@gmail.com
Please use my PGP key from Here



wow...nice work!

GsC_RuL3Z

May 2012

M T W T F S S
 123456
78910111213
1415 16 17181920
21222324252627
28293031   

Recent Comments

Random Album Image

happy_hour.jpg

Search My Blog

Latest Visitors

Twitter

Digg