Commit e28c1bef authored by Nicolas Dufour's avatar Nicolas Dufour Committed by Nicolas Dufour

Extensions. Extract Image fix for uppercase image type, and default path set...

Extensions. Extract Image fix for uppercase image type, and default path set to the user's home directory.

Fixed bugs:

(bzr r9336)
parent 0d391b95
......@@ -4,8 +4,9 @@
<dependency type="executable" location="extensions"></dependency>
<dependency type="executable" location="extensions"></dependency>
<param name="filepath" type="string" _gui-text="Path to save image">none</param>
<_param name="desc" type="description">Note: The file extension is appended automatically.</_param>
<param name="filepath" type="string" _gui-text="Path to save image:">none</param>
<_param name="desc" type="description" xml:space="preserve">* Don't type the file extension, it is appended automatically.
* A relative path (or a filename without path) is relative to the user's home directory.</_param>
<effect needs-live-preview="false">
......@@ -54,10 +54,16 @@ class MyEffect(inkex.Effect):
semicolon = xlink.find(';')
if semicolon>0:
for sub in mimesubext.keys():
if sub in xlink[5:semicolon]:
if sub in xlink[5:semicolon].lower():
if (not os.path.isabs(path)):
if == 'nt':
path = os.path.join(os.environ['USERPROFILE'],path)
path = os.path.join(os.path.expanduser("~"),path)
inkex.errormsg(_('Image extracted to: %s') % path)
data = base64.decodestring(xlink[comma:])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment