Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,631 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Loading image dialog [Re: EvilSOB] #325572
05/27/10 09:47
05/27/10 09:47
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
well you right, dont kknow wht happened :s

Now the bad side is that i want to copy the source file to the working folder, and im using bmap save_ ofcourse this is needs power of 2, and it adds extra black o the picture..
is there a way to save with the source dimensions.?

Last edited by MMike; 05/27/10 09:51.
Re: Loading image dialog [Re: MMike] #325586
05/27/10 10:32
05/27/10 10:32
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Save_bmap sucks... Avoid it for this sort of work.

Why not just 'actually' copy the file across?
Code:
...
	char buf[256];  //get file-path source name into 'buf'
			//(using one of the above methods will do)
	//////////////////////////////////////////////////////////////
	STRING* shortname  = str_create(buf);
		while(str_stri(shortname, "\\"))
		{	str_clip(shortname, str_stri(shortname, "\\"));		}
	STRING* targetname = str_create(work_dir);
		str_cat(targetname, shortname);
	file_cpy (targetname, _str(buf));
	//////////////////////////////////////////////////////////////
	str_remove(shortname);		str_remove(targetname);		//optional clean up


Be wary, there is NO crash-prevention checking in this code...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1