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
1 registered members (AndrewAMD), 692 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Resizing Bitmaps #411937
11/21/12 12:22
11/21/12 12:22
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
I have a bitmap.I want to resize it to 150 x and 100 y.I don't want any black padding.Just a stretching of bitmap.

Thanks


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: Resizing Bitmaps [Re: Yashas] #411940
11/21/12 12:51
11/21/12 12:51
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You can

- create a new bitmap with the required dimensions and copy the stuff over with bmap_blit or

- use a panel and use its scale_x and scale_y members. This however does not really change the size of the bitmap, but only the displayed size of the panel.


Always learn from history, to be sure you make the same mistakes again...
Re: Resizing Bitmaps [Re: Uhrwerk] #411960
11/21/12 15:03
11/21/12 15:03
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
Can u give an example of using bmap_bilt?
I don't understand the parameters and vector(x,y,z) ,now z(Hope not 3D bitmap grin ) what value do I need to give??

Last edited by Yashas; 11/21/12 15:04. Reason: Grammartical Correction + Fixes

Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: Resizing Bitmaps [Re: Yashas] #411961
11/21/12 15:06
11/21/12 15:06
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
The vector's z parameter is ignored. You can just use 0 for it. There is even an example in the manual that illustrates the usage of bmap_blit.


Always learn from history, to be sure you make the same mistakes again...
Re: Resizing Bitmaps [Re: Uhrwerk] #411967
11/21/12 15:26
11/21/12 15:26
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
Thanks laugh
Unfortunate that there is no reputation system in the forum
I wud hav given bumpers for u n few others grin


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: Resizing Bitmaps [Re: Yashas] #411973
11/21/12 15:54
11/21/12 15:54
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
Is this right??
bmap_blit(applet->Drag,Drag,vector(0,0,0),vector(100,100,0));

I am using a another computer(No Gamestudio Installed laugh ).So I asked weather it's correct(Can't test).


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: Resizing Bitmaps [Re: Yashas] #411974
11/21/12 16:05
11/21/12 16:05
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
Code:
bmap_blit(Temp->Drag,Drag,vector(0,0,0),vector(100,100,0));



This line is producing a script Crash!!

Complete Code:
Code:
Applet * CreateApplet(STRING * Name,STRING * Author,STRING * Version,STRING * Description,PANEL * Container,BMAP * Drag,int * Initilizer,int * Deinitlizer)
{
	if(!Container) { return error("CreateApplet:Invalid Container."); }
	if(!Initilizer) { return error("CreateApplet:Invalid Initilizer."); }
	if(!Deinitlizer) { return error("CreateApplet:Invalid Deinitilizer."); }
	if(!Name) { return error("CreateApplet:Invalid Name."); }
	
	Applet * Temp = sys_malloc(sizeof(Applet));
	Temp->Name = Name;
	Temp->Author = Author;
	Temp->Version = Version;
	Temp->Description = Description;
	Temp->Container = Container;
	bmap_blit(Temp->Drag,Drag,vector(0,0,0),vector(100,100,0));
	Temp->Initilize	= Initilizer;
	Temp->Deinitlize = Deinitlizer;
	return Temp;
}



Thanks To All


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: Resizing Bitmaps [Re: Yashas] #411976
11/21/12 16:27
11/21/12 16:27
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
*cough*initializing data*cough*


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Resizing Bitmaps [Re: WretchedSid] #411978
11/21/12 16:32
11/21/12 16:32
Joined: Nov 2011
Posts: 139
India
Yashas Offline OP
Member
Yashas  Offline OP
Member

Joined: Nov 2011
Posts: 139
India
Sorry, I did not get your point.


Keep smiling laugh
http://translation.babylon.com/ - Translate many languages
Re: Resizing Bitmaps [Re: Yashas] #411981
11/21/12 16:39
11/21/12 16:39
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Temp->Drag is never initialized to anything. You are telling the engine to write into a garbage pointer, which obviously crashes.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com

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