Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Add ability to add comments to png images. #212

Merged
merged 1 commit into from
May 21, 2021

Conversation

brugger1
Copy link
Contributor

@brugger1 brugger1 commented May 21, 2021

I added the ability to add comments to png images. The comments are visible in XV.

I added the ability to store comments to the built in PNGEncoder. I added 2 new Encode methods with an extra argument containing the comments. The comments consist of a key and a string. I went with a vector of strings. The number of strings needs to be a multiple of 2. Right now the existing Encode methods still need to exist. Ascent could be modified to use only the new ones.

I removed an unnecessary #include PNGEncoder.h from Renderer and ScalarRenderer since they weren't necessary.

I added Set/GetComments to Render as well as logic to pass them to PNGEncoder.

For compositor/Image, I added another Save method that took the comments in addition to the file name. This seemed like the more natural way to do it for that class.

I've tested this with Ascent running the lulesh proxie in serial. This hasn't been tested with other proxies or using Rover or in parallel.

Here is an image from the resulting file showing the comment in XV.

xv_comments

Since this is my first commit to vtk-h/ascent, I'm expecting a fair number of requests for changes.

@mclarsen
Copy link
Member

How hard is it to add the ability to read the comments from a png?

@mclarsen
Copy link
Member

I guess we don't actually have the decoder inside vtkh, but it would be useful to add in ascent.

@mclarsen mclarsen self-requested a review May 21, 2021 21:19
@mclarsen mclarsen merged commit 88cf207 into develop May 21, 2021
@brugger1 brugger1 deleted the task/brugger1/2021_05_21_png_comments branch May 21, 2021 23:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants