Skip to content

Conversation

@haganbmj
Copy link
Owner

So it's a bit of a hack stemming from card fields wanting to be primitive types (in this case a string filename), on top of that it wants the path to relative to the active set - so you need a set to write image files against. That seems a bit contrary to how new_card wants to operate, but I might be understating its usefulness.

So it's a bit of a hack stemming from card fields wanting to be primitive types (in this case a string filename), on top of that it wants the path to relative to the active set - so you _need_ a set to write image files against. That seems a bit contrary to how new_card wants to operate, but I might be understating its usefulness.

// If we're dealing with an in-memory image, go ahead and store it to an internal file within the set.
if (v->type() == ScriptType::SCRIPT_IMAGE) {
LocalFileName new_image_file = set->newFileName(name, settings.internal_image_extension ? _(".png") : _(""));
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably pull these out to a common function since this is just the same as what happens when using the slice window.

@haganbmj
Copy link
Owner Author

Ain't gonna say it's great, but it's a start to at least demonstrate storing an image during construction.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants