Convert
8 nodes
On this page 8
Conversion Targets
FunctionThe formats a file can be converted into, as extensions - .pdf, .docx - in the order Save as offers them; empty for a file nothing here reads.
ConversionTargets(source: Text) -> Text Array
string[] ConversionTargets(string source)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Text | — | The file, or only its name. |
Returns
| Extensions | Text Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Convert
- Package
- File Conversion
Convert
FunctionConverts a file into the format the target names: a document to PDF or Word, a picture to JPEG, a sound to MP3, a film to WebM, a model to glTF - whatever the conversion table offers for it.
Convert(source: Text, target: Text) -> Text Array
string[] Convert(string source, string target)
Parameters
| name | type | default | description |
|---|---|---|---|
| source | Text | — | The file to convert. |
| target | Text | — | Where to write it - a path, or an extension such as .pdf. |
Returns
| Files | Text Array |
Remarks
The target is a full path, or only the new extension - .pdf - to write beside the source under its own name. A document's pages written as pictures are one file each, named after the target with the page's number: notes_0001.png.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Convert
- Package
- File Conversion
Convert 3D Model
FunctionConverts a 3D model - OBJ, FBX, glTF, STL, PLY, Collada, 3DS, 3MF, Blender and some forty more - to glTF, OBJ, STL, PLY, FBX, Collada, 3MF, X3D, 3DS or DirectX.
Convert3DModel -> Text
source: Text
format: Model Target
folder: Textstring Convert3DModel(
string source,
ModelTarget format = ModelTarget.Glb,
string folder = "")Parameters
| name | type | default | description |
|---|---|---|---|
| source | Text | — | The model to convert. |
| format | Model Target | glTF binary | What to write it as. |
| folder | Text | — | Where to write it; empty for beside the source. |
Returns
| File | Text |
Remarks
The model's faces are cut into triangles. An OBJ is written with its materials beside it, a glTF with its buffer. STL and PLY hold shapes only, without materials, and OBJ, STL, PLY and 3MF hold no animation.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Convert
- Package
- File Conversion
Convert Audio
FunctionConverts a sound - WAV, MP3, FLAC, Ogg, Opus, M4A, AAC or AIFF - or a film's sound to MP3, M4A, Ogg Vorbis, Opus, FLAC or WAV.
ConvertAudio -> Text
source: Text
format: Audio Target
folder: Textstring ConvertAudio(
string source,
AudioTarget format = AudioTarget.Mp3,
string folder = "")Parameters
| name | type | default | description |
|---|---|---|---|
| source | Text | — | The sound or film to convert. |
| format | Audio Target | MP3 | What to write it as. |
| folder | Text | — | Where to write it; empty for beside the source. |
Returns
| File | Text |
Remarks
MP3 at 192 kbit/s, M4A as AAC at 128 kbit/s, Ogg Vorbis at quality 3, Opus at 96 kbit/s, FLAC at level 5, WAV as 16-bit PCM. A sound already in the target's codec is copied as it is.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Convert
- Package
- File Conversion
Convert Document
FunctionConverts a document or a text file: Markdown, text and source code to PDF or Word; Word to PDF, EPUB, PowerPoint, RTF, OpenDocument or HTML; a book to PDF, Word or PowerPoint; a deck to PDF; RTF, OpenDocument, HTML, Word 97-2003 and PDF to Word.
ConvertDocument -> Text
source: Text
format: Document Target
folder: Textstring ConvertDocument(
string source,
DocumentTarget format = DocumentTarget.Pdf,
string folder = "")Parameters
| name | type | default | description |
|---|---|---|---|
| source | Text | — | The document to convert. |
| format | Document Target | What to write it as. | |
| folder | Text | — | Where to write it; empty for beside the source. |
Returns
| File | Text |
Remarks
A PDF becomes a Word document of its pages as they look, to edit: its text in text boxes where it stood, its pictures where they stood, and the rest of what it draws behind them; a font that is not installed here is set in the nearest installed one. It holds glyphs at positions rather than paragraphs, so it becomes no other kind of document. PDF to Images draws its pages.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Convert
- Package
- File Conversion
Convert Image
FunctionConverts a picture - PNG, JPEG, BMP, GIF, TGA, WebP, TIFF, QOI, an icon or Netpbm - to another format, or to a PDF of one page.
ConvertImage -> Text
source: Text
format: Image Target
folder: Textstring ConvertImage(
string source,
ImageTarget format = ImageTarget.Png,
string folder = "")Parameters
| name | type | default | description |
|---|---|---|---|
| source | Text | — | The picture to convert. |
| format | Image Target | PNG | What to write it as. |
| folder | Text | — | Where to write it; empty for beside the source. |
Returns
| File | Text |
Remarks
A JPEG is written at quality 100 with its colour at full resolution, and has no transparency: what was transparent is on white. A WebP is written lossless. A GIF holds at most 256 colours.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Convert
- Package
- File Conversion
Convert Video
FunctionConverts a film - MP4, WebM, Matroska or QuickTime, in H.264, VP8 or VP9 - to another of them.
ConvertVideo -> Text
source: Text
format: Video Target
folder: Textstring ConvertVideo(
string source,
VideoTarget format = VideoTarget.Mp4,
string folder = "")Parameters
| name | type | default | description |
|---|---|---|---|
| source | Text | — | The film to convert. |
| format | Video Target | MP4 | What to write it as. |
| folder | Text | — | Where to write it; empty for beside the source. |
Returns
| File | Text |
Remarks
MP4 and QuickTime are written as H.264 and AAC, Matroska as H.264 and Opus, WebM as VP9 and Opus. A stream already in the target's codec is copied as it is; subtitles are left out. Convert Audio takes a film's sound alone.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Convert
- Package
- File Conversion
PDF to Images
FunctionDraws every page of a PDF - or of a Word document, a book or a deck - as a picture, one file a page, named with the page's number: report_0001.png, report_0002.png.
PdfToImages -> Text Array
source: Text
format: Page Image Target
DPI: Number
folder: Textstring[] PdfToImages(
string source,
PageImageTarget format = PageImageTarget.Png,
double dpi = 150,
string folder = "")Parameters
| name | type | default | description |
|---|---|---|---|
| source | Text | — | The document whose pages to draw. |
| format | Page Image Target | PNG | What each page is written as. |
| DPI | Number | 150 | How finely to draw, in dots per inch: 150 makes a page of US Letter 1275 × 1650 pixels. |
| folder | Text | — | Where to write the pages; empty for beside the source. |
Returns
| Pages | Text Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Convert
- Package
- File Conversion