From 3057358cfcc0245a1515ed47fc00cc7d3ce1866e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 7 Nov 2012 23:54:00 +0100 Subject: [PATCH] Index the dimensions of images. --- pkg/index/index.go | 8 +++--- pkg/index/indextest/testdata/dude.jpg | Bin 0 -> 1932 bytes pkg/index/indextest/tests.go | 34 ++++++++++++++++++++++++-- pkg/index/keys.go | 12 +++++++++ pkg/index/receive.go | 34 +++++++++++++++++++++++++- 5 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 pkg/index/indextest/testdata/dude.jpg diff --git a/pkg/index/index.go b/pkg/index/index.go index 7f7001778..58590a5d3 100644 --- a/pkg/index/index.go +++ b/pkg/index/index.go @@ -586,10 +586,10 @@ func (x *Index) EdgesTo(ref *blobref.BlobRef, opts *search.EdgesToOpts) (edges [ } for _, parentRef := range permanodeParents { edges = append(edges, &search.Edge{ - From: parentRef, - FromType: "permanode", - To: ref, - }) + From: parentRef, + FromType: "permanode", + To: ref, + }) } return edges, nil } diff --git a/pkg/index/indextest/testdata/dude.jpg b/pkg/index/indextest/testdata/dude.jpg new file mode 100644 index 0000000000000000000000000000000000000000..447710ecc79f39cd08c0d10fe10261d622c84758 GIT binary patch literal 1932 zcmb7Cc{JPU8vaE@XbB;9u|{L3sf>=LmBbc1ZPiFnB{NJKgKAn-sj6iRN<&*pg{HQm z)>LY_L%7;%ucO*ZYEP)8Ox3ltRBn3jopbNM^L)>F|9Ic`dA{d6=M#;KW&j0u7orOQ z0)YTG@c~5pfD$2&5*AO1(7hNHAF1m~^zs$G0|)>FEGa1ohKLIU0+E8sN<+nvKX_0^ z7A~)-2$zS$l~lA;l@J=raJZVDng$Z7qobpws*lpwMrmp5Xn!*SiKS2}C`?)!rj39j zwEr?he*@ssKm>pRgY*FjI0y^}iMRj~00H1{1Oa~nDlG$%kdy*}#ba9q00fp02N%be z`S$`y0xSuL9|2dC*2DQJ9S(~{=o?&>QO2MQ(+XP9)&&2!LS|L7Sc~{S&;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