| 
			
			Posted By
		 | 
		
			
			Message
		 | 
  	
	
	
		
  			  jer
  
  Registered   06/07/2004
 Points   3
  		 | 
  		
  		
  		 
  			7th July, 2004 at 00:06:49 - 
  		
			
		
  			
  		 
  			
			
			
			 
			I'm fairly new with MMF so maybe this has already been brought up before, but here goes..
 
I'm working on a little graphic editing tool and I'm trying to (manually) load .BMPs. I'm using an extension called "Binary Object" to import the color codes from the .bmp (which are stored as hex values), and it works fine until it reads any value over 7F. It just crashes.
 
Has anyone else ever tried to read hex data before? Is there a better/easier way to do it? or does anyone have a solution for that Binary Object extension bug? 
 
 
Thanks
			
  	    
 
   
  			n/a
  		
  		 | 
  	
  	
  	
		
  			  Assault Andy Administrator 
I make other people create vaporware
  Registered   29/07/2002
 Points   5661
 
       
  		 | 
  		
  		
  		 
  			7th July, 2004 at 03:31:57 -
  		
			
		
  			
  		  
  			
				Active Picture object  
			
  	    
 
   
  			Creator of Faerie Solitaire:
 
http://www.create-games.com/download.asp?id=7792 
 
Also creator of ZDay20 and Dungeon Dash.
 
http://www.Jigxor.com 
 
http://twitter.com/JigxorAndy 
  		
  		 | 
  	
  	
  	
  	
  	
		
  			  ChrisB Crazy?
  Registered   16/08/2002
 Points   5457
  		 | 
  		
  		
  		 
  			7th July, 2004 at 06:28:38 -
  		
			
		
  			
  		  
  			
				I've never had a problem with the Binary Object. Check the size of the object after you load the BMP file. (By the way, I doubt the colour codes are stored as hex values, AFAIK they're simply sets of 3 or 4 bytes at a certain point in the file. How are you getting these colour values exactly?)
 
 
Also make sure you're checking the type of bitmap (true colour/paletted) before you try and read a palette. If you're not sure, there are plenty of websites that tell you the format of bitmaps and the offset values of all the data fields.
			
  	    
 
   
  			n/a 
  		
  		 | 
  	
  	
  	
  	
  	
		
  			  Kris Possibly Insane  
  Registered   17/05/2002
 Points   2017
  		 | 
  		
  		
  		 
  			7th July, 2004 at 06:47:32 -
  		
			
		
  			
  		  
  			
				getting pixels on the binary level is a bit iffy, especially with the new[?] system they use (Bottom-to-top load order, 4 byte padding, and whatnot)
			
  	    
 
   
  			"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G
  		
  		 | 
  	
  	
  	
  	
  	
		
  			  ChrisB Crazy?
  Registered   16/08/2002
 Points   5457
  		 | 
  		
  		
  		 
  			7th July, 2004 at 12:12:22 -
  		
			
		
  			
  		  
  			
				I wouldn't say it's iffy, it's just something you have to remember if you don't want your pictures to come out upside-down
			
  	    
 
   
  			n/a 
  		
  		 | 
  	
  	
  	
  	
  	
		
  			  ShadowCaster Possibly Insane  
  Registered   02/01/2002
 Points   2203
  		 | 
  		
  		
  		 
  			7th July, 2004 at 20:31:55 -
  		
			
		
  			
  		  
  			
				Big/Little endian. That's a problem when using binary. I dont know what bitmaps use, but you should probably find out and make sure your program is using the same when loading data from the file.
 
 
  Mike  
			
  	    
 
   
  			"Now I guess we're... 'Path-E-Tech Management'" -Dilbert
  		
  		 | 
  	
  	
  	
  	
  	
		
  			  jer
  
  Registered   06/07/2004
 Points   3
  		 | 
  		
  		
  		 
  			7th July, 2004 at 22:32:59 -
  		
			
		
  			
  		  
  			
				Thanks for the replies, but forget about .BMPs for a second  
 
My problem is more with that Binary Object extension and its Binary->ASCII filtering feature.. does anyone have any docs/examples showing how to use that properly? 
 
 
			
  	    
 
   
  			n/a
  		
  		 | 
  	
  	
  	
		
			| 
				 
			 | 
	    		
				  
	    		 |