Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: construction of new_card with images? (closes #36) #38

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

1 participant