-
Notifications
You must be signed in to change notification settings - Fork 402
Add GMT_IS_IMAGE case #8881
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
base: master
Are you sure you want to change the base?
Add GMT_IS_IMAGE case #8881
Conversation
|
@joa-quim |
|
@Chuan1937 Thanks a lot for looking into this. However, I don't think it solves it. Adding a GMT_IS_IMAGE branch doesn't help because in if ((err = gmtinit_get_region_from_data (API, GMT_IS_GRID, exact, options, wesn, &API->GMT->common.R.aspect))) and in fact this doesn't seem to be a problem because at the end the code flow ends up in the function that read an image. I have debugged this a bit further but still think there is something fundamentally broken in And your test script. Yes, I guess it will work but it is not testing this case. Reading a file works fine, but reading one that is already loaded in memory (and you would need GMT.jl to test this) is where this keep failing. |
|
Can you give me the failed Julia Code? |
- Modified gmtinit_set_missing_R_from_grid to detect image files by extension and use GMT_IS_IMAGE instead of hardcoded GMT_IS_GRID - Modified gmtapi_import_image to skip padding checks when GMT_CONTAINER_ONLY is set, allowing pre-loaded images to be imported for header reading - This fixes the failure when using multiple pre-loaded images in Julia subplots
|
I smell the scent of a challenge 😃 When I have a easy to use Julia function I'll post instructions here (later today). But your attempts are way off. A pre-loaded image is one that was already read and data is present in memory. That is what the wrappers do when they want to send in data already available. It has nothing to do files and extensions. Have a look at my attempt that almost worked |
|
OK, you need to install the GMT.jl master version. You do that with: than pick two images (whatever) and do |
Add a GMT_IS_IMAGE branch to the gmtinit_get_region_from_data() function, read the image header information using the correct image type and GMT_CONTAINER_ONLY mode, extract the boundary coordinates, and then release the data structure.
Fixes #8878