9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] resize
@ 2012-10-30 21:06 erik quanstrom
  0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2012-10-30 21:06 UTC (permalink / raw)
  To: 9fans

i found a little bug today with one-pixel tracking images.  (yahoo.co.jp, for instance.)
i don't think this program is in the distribution.

; diffy -c resize.c
/n/dump/2012/1030/sys/src/cmd/resize.c:17,24 - resize.c:17,24
  	bpp = src->depth/8;
  	bpl = src->width*sizeof(int);

- 	qp.x = (ssize.x<<12)/dsize.x;
- 	qp.y = (ssize.y<<12)/dsize.y;
+ 	qp.x = (ssize.x<<12)/(dsize.x==0? 1: dsize.x);
+ 	qp.y = (ssize.y<<12)/(dsize.y==0? 1: dsize.y);
  	_sp.y = sr.min.y<<12;
  	for(dp.y=0; dp.y<=dsize.y; dp.y++){
  		sp.y = _sp.y>>12;



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-30 21:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-30 21:06 [9fans] resize erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).