Skip to content

Commit

Permalink
Update Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkBaker committed Nov 6, 2022
1 parent 4a55c14 commit c3bab5c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/topics/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,22 @@ $drawing->setHeight(36);
$drawing->setWorksheet($spreadsheet->getActiveSheet());
```

Note that GD images are memory-intensive.

### Creating a Drawing from string or stream data

If you want to create a drawing from a string containing the binary image data, or from an external datasource such as an S3 bucket, then you can create a new MemoryDrawing from these sources using the `fromString()` or `fromStream()` static methods.

```php
$drawing = MemoryDrawing::fromString($imageString);
```

```php
$drawing = MemoryDrawing::fromStream($imageStreamFromS3Bucket);
```

Note that this is a memory-intensive process, like all gd images; and also creates a temporary file.

## Reading Images from a worksheet

A commonly asked question is how to retrieve the images from a workbook
Expand Down

0 comments on commit c3bab5c

Please sign in to comment.