Show cropped portions of screenshots for screenshot comments

Review Request #152 — Created Sept. 8, 2007 and submitted


Review Board SVN (deprecated)


Added support for showing the part of a screenshot the user had commented on. This gives reviewers and developers the ability to see what part of the screenshot the reviewer was commenting on without having to go to the screenshot.
Created some test comments on a screenshot and saw that those selected areas appeared in the review body.


  2. Hmm.  I wonder if it wouldn't be better to serve these images dynamically through python and cache the result.  This is potentially a lot of additional image storage on top of the base images.
    On the other hand, maybe it's not worth it.
    1. I considered that. It is a lot of work though we might want to go that direction in the future. Also, this same problem applies to thumbnails.
      Here's what I'm planning for an upcoming change...
      In my BLT project, I've modified all the thumbnailing code and uploading code to handle datestamped directories, so you know when something was uploaded (and keeps us from having one huge directory of images).
      I'd like to have 3 sets of datestamped image directories: screenshots, thumbnails, and cropped images.
      The nice thing then is that we can periodically delete old directories (say, anything that's two months old). At this point we might want to have a maintenance script you just run in your crontab that handles all this. Worst case scenario, people see it's filling up and just nuke the thumbnails and cropped images.
      This would give us the speed advantages of static files without the messy generation code.
    2. Sounds good.
  3. Aside from that question, this looks fine.