<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dabo.leafe.com/index.php?action=history&amp;feed=atom&amp;title=Dabo.ui.strToBmp</id>
	<title>Dabo.ui.strToBmp - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dabo.leafe.com/index.php?action=history&amp;feed=atom&amp;title=Dabo.ui.strToBmp"/>
	<link rel="alternate" type="text/html" href="https://wiki.dabo.leafe.com/index.php?title=Dabo.ui.strToBmp&amp;action=history"/>
	<updated>2026-11-21T22:37:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://wiki.dabo.leafe.com/index.php?title=Dabo.ui.strToBmp&amp;diff=4150&amp;oldid=prev</id>
		<title>Ed: Created page with &quot;== Signature: ==  &lt;syntaxhighlight lang=&quot;python&quot;&gt; dabo.ui.strToBmp(val, scale=None, width=None, height=None) &lt;/syntaxhighlight&gt;  == Description: == This can be either a path,...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.dabo.leafe.com/index.php?title=Dabo.ui.strToBmp&amp;diff=4150&amp;oldid=prev"/>
		<updated>2020-05-14T15:47:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Signature: ==  &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt; dabo.ui.strToBmp(val, scale=None, width=None, height=None) &amp;lt;/syntaxhighlight&amp;gt;  == Description: == This can be either a path,...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Signature: ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
dabo.ui.strToBmp(val, scale=None, width=None, height=None)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description: ==&lt;br /&gt;
This can be either a path, or the name of a built-in graphic. If an adjusted size is desired, you can either pass a &amp;lt;code&amp;gt;scale&amp;lt;/code&amp;gt; value (where 1.00 is full size, 0.5 scales it to 50% in both &amp;lt;code&amp;gt;Height&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Width&amp;lt;/code&amp;gt;), or you can pass specific &amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;width&amp;lt;/code&amp;gt; values. The final image will be a bitmap resized to those specs.&lt;br /&gt;
&lt;br /&gt;
== Returns: ==&lt;br /&gt;
A bitmap of the specified image, or &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt; if an invalid image was specified.&lt;br /&gt;
&lt;br /&gt;
== Comments: ==&lt;br /&gt;
This is the heart of the simplification of image handling. It allows you to simply specify a file path for something like the &amp;lt;code&amp;gt;Picture&amp;lt;/code&amp;gt; property of an [[dImage]] control, rather than having to manually read in the file and convert it from its native format to a display bitmap.&lt;br /&gt;
&lt;br /&gt;
== Parameters: ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;val&amp;#039;&amp;#039;&amp;#039; - This is a string representing the image to be displayed. It can be either a file path, or the name of a built-in graphic, or a standard Dabo icon.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;scale&amp;#039;&amp;#039;&amp;#039; - A value by which the original image will be scaled. A value of 1 returns the image at its original size; a value of 2.5 returns the image enlarged by 2500%; a value of 0.6 returns the image reduced to 60% of its original size.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;width&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;height&amp;#039;&amp;#039;&amp;#039; - Rather than pass a percentage to scale the entire image, you can pass an absolute value for either the &amp;lt;code&amp;gt;width&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; (or both). The returned image will be resized to match the sizes you pass. If you pass, say, just a &amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; value, the width will remain unchanged, and the height will be modified to the specified value.&lt;/div&gt;</summary>
		<author><name>Ed</name></author>
	</entry>
</feed>