Difference between revisions of "WriteImageFile"

m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:Image and canvas functions]]
 
[[Category:Image and canvas functions]]
 
[[Category:Database Functions]]
 
[[Category:Database Functions]]
 +
[[category:File system functions]]
 +
 +
{{ReleaseBar}}
  
 
''New to [[Analytica 5.0]]''
 
''New to [[Analytica 5.0]]''
Line 6: Line 9:
 
''Requires Analytica Enterprise edition or better.''
 
''Requires Analytica Enterprise edition or better.''
  
== WriteImageFile( filename, image'', showDialog, warn, mimeType, title'' ) ==
+
== WriteImageFile( filename, image'', showDialog, warn, mimeType, title{{Release|6.0||, download}}'' ) ==
  
 
Writes an in-memory image to a file.  
 
Writes an in-memory image to a file.  
  
* «filename»: When a full (absolute) filename is not supplied, the file name is relative to the [[CurrentDataFolder]].
+
* «filename»: When a full (absolute) filename is not supplied, the file name is relative to the [[CurrentDataFolder]]. {{Release|6.4||
 +
*:When «filename» is <code>"<>"</code>, the image is written to an in-memory binary data term.}}
 
* «image»: An image, obtained from the <code>(Pict Of «obj»)</code> attribute, or from a function that returns an image such as [[ReadImageFile]], [[ReadFromUrl]], or [[CanvasImage]].
 
* «image»: An image, obtained from the <code>(Pict Of «obj»)</code> attribute, or from a function that returns an image such as [[ReadImageFile]], [[ReadFromUrl]], or [[CanvasImage]].
 
* «showDialog»: (Optional) When <code>True</code>, the file finder dialog is always presented to the user. When <code>False</code>, the dialog is never presented to the user. When omitted, the dialog is shown only if the file cannot be written to «filename», or if the file already exists and you haven't specified <code>warn:False</code>.
 
* «showDialog»: (Optional) When <code>True</code>, the file finder dialog is always presented to the user. When <code>False</code>, the dialog is never presented to the user. When omitted, the dialog is shown only if the file cannot be written to «filename», or if the file already exists and you haven't specified <code>warn:False</code>.
 
* «warn»: (Optional) When <code>True</code>, a warning is issued if <code>showDialog:False</code> and the file exists. This warning will only be shown when [[Preferences#Show result warnings|Show Result Warnings]] is enabled.
 
* «warn»: (Optional) When <code>True</code>, a warning is issued if <code>showDialog:False</code> and the file exists. This warning will only be shown when [[Preferences#Show result warnings|Show Result Warnings]] is enabled.
 
* «mimeType»: (Optional) Specifies the preferred file type, such as <code>'PNG'</code>, <code>'JPG'</code>, etc., for the image.
 
* «mimeType»: (Optional) Specifies the preferred file type, such as <code>'PNG'</code>, <code>'JPG'</code>, etc., for the image.
* «title»: (Optional) A custom caption shown in the file selector when the file selector is displayed.
+
* «title»: (Optional) A custom caption shown in the file selector when the file selector is displayed.{{Release|6.0||
 +
* «download»: (Option) When <code>True</code> and running in [[ACP]], the image downloaded to the end user's computer as an image file with the name «filename».}}
  
 
== See Also ==
 
== See Also ==
Line 21: Line 26:
 
* [[ReadFromURL]]
 
* [[ReadFromURL]]
 
* [[CanvasImage]]
 
* [[CanvasImage]]
* [[ImageInfo]]
+
* [[ImageInfo]]{{Release|6.4||
 +
* If you write to an in-memory binary data term, see: [[ReadBinaryFile]], [[GetFromBinaryData]], [[BinaryDataSize]]}}

Latest revision as of 18:51, 8 August 2023




Release:

4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3  •  6.4  •  6.5


New to Analytica 5.0

Requires Analytica Enterprise edition or better.

WriteImageFile( filename, image, showDialog, warn, mimeType, title, download )

Writes an in-memory image to a file.

  • «filename»: When a full (absolute) filename is not supplied, the file name is relative to the CurrentDataFolder.
    When «filename» is "<>", the image is written to an in-memory binary data term.
  • «image»: An image, obtained from the (Pict Of «obj») attribute, or from a function that returns an image such as ReadImageFile, ReadFromUrl, or CanvasImage.
  • «showDialog»: (Optional) When True, the file finder dialog is always presented to the user. When False, the dialog is never presented to the user. When omitted, the dialog is shown only if the file cannot be written to «filename», or if the file already exists and you haven't specified warn:False.
  • «warn»: (Optional) When True, a warning is issued if showDialog:False and the file exists. This warning will only be shown when Show Result Warnings is enabled.
  • «mimeType»: (Optional) Specifies the preferred file type, such as 'PNG', 'JPG', etc., for the image.
  • «title»: (Optional) A custom caption shown in the file selector when the file selector is displayed.
  • «download»: (Option) When True and running in ACP, the image downloaded to the end user's computer as an image file with the name «filename».

See Also

Comments


You are not allowed to post comments.