Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,227 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 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 | chip programmers | 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