-
Notifications
You must be signed in to change notification settings - Fork 359
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
Fix the duplication and freeing of GMT_IMAGE #3438
Conversation
Several problems fixed, but not completed: 1. GMT_IMAGE members colormap and color_interp were not duplicated by GMT_Duplicate_Data. 2. grdimage projected I to Img_proj and deleted I, but then refered to I->colormap instead of Img_proj->colormap However, the colormap entries we obtain do not match the ones gdalinfo reports on the commandline and the image looks like shit.
I think this is now all working (at least for me on macOS locally). Need to be tested on other OS as well. Here are the changes:
This PR closes #3436. |
It works but prints that annoying and false warning 3 three times and mixes ERROR and WARNING
|
But I deal with that.... OK will check. |
Try now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works now and silently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests ex52 and marbles.sh pass on all platforms.
I think grdimage.c can loose some lines. If I am correct, @joa-quim, given that indexed images ahve been replaced earlier, we only either have gray or RGB[A] images in the loops, and we only need to copy the R[GB] into the rgb array for 1 or 3 values. So the business with r_table, g_table, b_table is no longer needed I think |
Two main problems fixed, but the plotting is still not correct:
However, the colormap entries we do obtain in gmt_gdalread.c do not match the ones gdalinfo reports on the command-line and the image looks like shit. See #3436 for more information.