@Test public void testEfficientGIF() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/unanimated.gif", "image/gif"); HttpResponse httpResponse = rewrite(resp); assertSame(resp, httpResponse); }
/** * This is a GIF image with an palette that contains transparent entries but * that has not pixels that map to them so it is Opaque. * @throws Exception */ @Test public void testBadPaletteGIFToPNG() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/large.gif", "image/gif"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/png", httpResponse.getHeader("Content-Type")); }
/** * This is a GIF image with has a direct color model instead of an indexed one and has * tranparency * @throws Exception */ @Test public void testDirectColorModelGif() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/directcolor.gif", "image/gif"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/gif", httpResponse.getHeader("Content-Type")); }
/** * This is a GIF image with an palette that contains transparent entries but * that has not pixels that map to them so it is Opaque. * @throws Exception */ @Test public void testBadPaletteGIFToPNG() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/large.gif", "image/gif"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/png", httpResponse.getHeader("Content-Type")); }
@Test public void testEfficientGIF() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/unanimated.gif", "image/gif"); HttpResponse httpResponse = rewrite(resp); assertSame(resp, httpResponse); }
/** * This is a GIF image with has a direct color model instead of an indexed one and has * tranparency * @throws Exception */ @Test public void testDirectColorModelGif() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/directcolor.gif", "image/gif"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/gif", httpResponse.getHeader("Content-Type")); }
@Test public void testEfficientGIF() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/unanimated.gif", "image/gif"); HttpResponse httpResponse = rewrite(resp); assertSame(resp, httpResponse); }
/** * This is a GIF image with has a direct color model instead of an indexed one and has * tranparency * @throws Exception */ @Test public void testDirectColorModelGif() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/directcolor.gif", "image/gif"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/gif", httpResponse.getHeader("Content-Type")); }
/** * This is a GIF image with an palette that contains transparent entries but * that has not pixels that map to them so it is Opaque. * @throws Exception */ @Test public void testBadPaletteGIFToPNG() throws Exception { HttpResponse resp = createResponse("org/apache/shindig/gadgets/rewrite/image/large.gif", "image/gif"); HttpResponse httpResponse = rewrite(resp); assertTrue(httpResponse.getContentLength() <= resp.getContentLength()); assertEquals("image/png", httpResponse.getHeader("Content-Type")); }