-
-
Notifications
You must be signed in to change notification settings - Fork 590
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
crop an image and change home bounds #2527
Comments
You want https://openseadragon.github.io/docs/OpenSeadragon.TiledImage.html#setClip For example:
|
You can do that like so:
That'll automatically zoom you to that location. However it won't reset the home position, so if the user clicks the "home" button it'll still zoom them back out all the way. You might try |
How do I get a cropped image instead of cropping it to affect the original image |
OSD doesn't have a feature for that. It might be interesting to explore adding that feature; I imagine it'll take some doing. Meanwhile, can you crop the image on the server before sending it to OSD? |
Isn't this what |
@pearcetm Both I could see how a "true crop" where the bounds of the image are changed would be nice for working with data sets the developer doesn't have direct control over (or where there's a desire to crop out things nondestructively). I'm not sure how we would go about it, though, as the true bounds of the image are important for tile handling. Also, of course, we would want to maintain backwards compatibility with apps that expect the current behavior. Perhaps some kind of flag on the image that indicates that the I figure the main concern here is just having "home" honor the clip bounds, but perhaps there are other implications as well. |
@iangilman I wasn't clear on exactly what @Whao510 was looking for - you might be right that it was specifically about the bounds. I thought maybe they were just asking how to crop an image at all. One way that bounds could be handled for clipped and cropped images is keeping the true bounds as they are (important for tile positioning, as you say) and keep a separate variable ( |
Yeah, I think that would be a good way to go. We'll see if someone wants to pick up the task. |
Hi,
I have an image 1000x1000 px of which I want to display only the cropped part from coord. (100,100) to coord. (500,500).
The complete image is displayed with the following script:
$json is the manifest of the image
Which command should I add to crop this image?
Thanks
The text was updated successfully, but these errors were encountered: