I grew frustrated not being able to push a new patchset to the rietveld issue ...
15 years, 1 month ago
(2011-06-15 08:58:11 UTC)
#2
I grew frustrated not being able to push a new patchset to the
rietveld issue so I switched to gerrit and pushed to that new issue
there:
http://camlistore.org/r/8
I changed it all according to your comments. Details below in the text.
On Tue, Jun 14, 2011 at 4:07 AM, <bradfitz@gmail.com> wrote:
>
> http://codereview.appspot.com/4585051/diff/1/server/go/camlistored/ui.go
> File server/go/camlistored/ui.go (right):
>
>
http://codereview.appspot.com/4585051/diff/1/server/go/camlistored/ui.go#newc...
> server/go/camlistored/ui.go:53: var thumbnailPattern =
> regexp.MustCompile(`^/ui/thumbnail/([^/]+)(/.*)?$`)
> shouldn't include /ui/ here, as that part is configurable by the user.
> just do what downloadPattern does, but do "thumbnail" instead of
> "download"
Done. that's what I had done at first but since the part that strips
"ui" from the url isn't there yet, I had to add "ui" to the pattern
for testing the whole chain.
>
http://codereview.appspot.com/4585051/diff/1/server/go/camlistored/ui.go#newc...
> server/go/camlistored/ui.go:320: widthPattern :=
> regexp.MustCompile(`mw=([0-9]+)`)
> don't use a regexp for this. just ask the URL:
>
> query := req.URL.Query()
> width, err = strconv.Atoi(query.Get("mw"))
thx, done. I keep forgetting that golang.org doc doesn't have the
latest changes so I missed out on the new shiny stuff in the http
package.
I'll use a local godoc from now on.
In the first version I had checks so that it would be possible for the
ui to only send one of mw or my as long as one of the two was valid. I
dropped that because it doesn't seem that useful in retrospect.
>
http://codereview.appspot.com/4585051/diff/1/server/go/camlistored/ui.go#newc...
> server/go/camlistored/ui.go:414: //TODO: other formats
> oh, you're preserving the file type.
>
> you might as say that jpg preserves to jpg but everything else ends up
> just writing a png thumbnail?
Done. Out of curiosity, why like that and not the other way around as
I had done first? you think .png are a better default choice for
thumbnails sizewise? faster compression?
> http://codereview.appspot.com/4585051/
>
On Wed, Jun 15, 2011 at 1:58 AM, Mathieu Lonjaret < mathieu.lonjaret@gmail.com> wrote: > I ...
15 years, 1 month ago
(2011-06-15 15:48:29 UTC)
#4
On Wed, Jun 15, 2011 at 1:58 AM, Mathieu Lonjaret <
mathieu.lonjaret@gmail.com> wrote:
> I grew frustrated not being able to push a new patchset to the
> rietveld issue so I switched to gerrit and pushed to that new issue
> there:
> http://camlistore.org/r/8
> I changed it all according to your comments. Details below in the text.
>
Gerrit is nicer anyway, so that was good.
>
>
> >
>
http://codereview.appspot.com/4585051/diff/1/server/go/camlistored/ui.go#newc...
> > server/go/camlistored/ui.go:414: //TODO: other formats
> > oh, you're preserving the file type.
> >
> > you might as say that jpg preserves to jpg but everything else ends up
> > just writing a png thumbnail?
>
> Done. Out of curiosity, why like that and not the other way around as
> I had done first? you think .png are a better default choice for
> thumbnails sizewise? faster compression?
>
If it's not a jpeg, it's probably a tiff or bmp or icon or some other
lossless format anyway... might as well keep that. Plus a thumbnail will be
small anyway, so png works.
Issue 4585051: thumbnail support
(Closed)
Created 15 years, 1 month ago by mpl
Modified 15 years, 1 month ago
Reviewers: brad_danga_com, dangabrad
Base URL: git@github.com:mpl/camlistore.git@master
Comments: 3