Re: Image from DB example

2007-09-10 Thread Anthony J Webster
If I remember correctly (this was a while back) it doesn't work over firefox 
either...

I'll check up on the link.
Thanks

Anthony

- Original Message - 
From: "Igor Vaynberg" <[EMAIL PROTECTED]>

To: 
Sent: Monday, September 10, 2007 4:58 PM
Subject: Re: Image from DB example



google pngfix for explorer

-igor


On 9/10/07, Anthony J Webster <[EMAIL PROTECTED]> wrote:


Along these lines I haven't managed to get images with transparency to
display properly. My PNGs all display black instead of transparent pixels
:(.
Anthony

- Original Message -
From: "Igor Vaynberg" <[EMAIL PROTECTED]>
To: 
Sent: Monday, September 10, 2007 4:32 PM
Subject: Re: Image from DB example


> see sourcecode of the pastebin, i think its on belios. also there is an
> article on the wiki about it.
>
> -igor
>
>
> On 9/9/07, Doug Leeper <[EMAIL PROTECTED]> wrote:
>>
>>
>> I am looking for an example that obtains an image from the db and
>> displays
>> it.  Can anyone point me in the right direction?  I couldn't find the
>> cdApp
>> in wicket-contrib-examples
>>
>> I know that I need to use a Resource or some derivative of one, but I
>> want
>> to make sure that the Image is not stored in session.  I am converting
an
>> existing JSP/Pageflow project to Wicket and have used a specific
servlet
>> to
>> stream the image but not sure how to do in Wicket.
>>
>>
>> Thanks in advance,
>> - Doug
>> --
>> View this message in context:
>> http://www.nabble.com/Image-from-DB-example-tf4410796.html#a12582968
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Image from DB example

2007-09-10 Thread Igor Vaynberg
google pngfix for explorer

-igor


On 9/10/07, Anthony J Webster <[EMAIL PROTECTED]> wrote:
>
> Along these lines I haven't managed to get images with transparency to
> display properly. My PNGs all display black instead of transparent pixels
> :(.
> Anthony
>
> - Original Message -
> From: "Igor Vaynberg" <[EMAIL PROTECTED]>
> To: 
> Sent: Monday, September 10, 2007 4:32 PM
> Subject: Re: Image from DB example
>
>
> > see sourcecode of the pastebin, i think its on belios. also there is an
> > article on the wiki about it.
> >
> > -igor
> >
> >
> > On 9/9/07, Doug Leeper <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> I am looking for an example that obtains an image from the db and
> >> displays
> >> it.  Can anyone point me in the right direction?  I couldn't find the
> >> cdApp
> >> in wicket-contrib-examples
> >>
> >> I know that I need to use a Resource or some derivative of one, but I
> >> want
> >> to make sure that the Image is not stored in session.  I am converting
> an
> >> existing JSP/Pageflow project to Wicket and have used a specific
> servlet
> >> to
> >> stream the image but not sure how to do in Wicket.
> >>
> >>
> >> Thanks in advance,
> >> - Doug
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Image-from-DB-example-tf4410796.html#a12582968
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Image from DB example

2007-09-10 Thread Anthony J Webster
Along these lines I haven't managed to get images with transparency to 
display properly. My PNGs all display black instead of transparent pixels 
:(.

Anthony

- Original Message - 
From: "Igor Vaynberg" <[EMAIL PROTECTED]>

To: 
Sent: Monday, September 10, 2007 4:32 PM
Subject: Re: Image from DB example



see sourcecode of the pastebin, i think its on belios. also there is an
article on the wiki about it.

-igor


On 9/9/07, Doug Leeper <[EMAIL PROTECTED]> wrote:



I am looking for an example that obtains an image from the db and 
displays

it.  Can anyone point me in the right direction?  I couldn't find the
cdApp
in wicket-contrib-examples

I know that I need to use a Resource or some derivative of one, but I 
want

to make sure that the Image is not stored in session.  I am converting an
existing JSP/Pageflow project to Wicket and have used a specific servlet
to
stream the image but not sure how to do in Wicket.


Thanks in advance,
- Doug
--
View this message in context:
http://www.nabble.com/Image-from-DB-example-tf4410796.html#a12582968
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Image from DB example

2007-09-10 Thread Igor Vaynberg
see sourcecode of the pastebin, i think its on belios. also there is an
article on the wiki about it.

-igor


On 9/9/07, Doug Leeper <[EMAIL PROTECTED]> wrote:
>
>
> I am looking for an example that obtains an image from the db and displays
> it.  Can anyone point me in the right direction?  I couldn't find the
> cdApp
> in wicket-contrib-examples
>
> I know that I need to use a Resource or some derivative of one, but I want
> to make sure that the Image is not stored in session.  I am converting an
> existing JSP/Pageflow project to Wicket and have used a specific servlet
> to
> stream the image but not sure how to do in Wicket.
>
>
> Thanks in advance,
> - Doug
> --
> View this message in context:
> http://www.nabble.com/Image-from-DB-example-tf4410796.html#a12582968
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Image from DB example

2007-09-10 Thread Ayodeji Aladejebi
i have something similar, an image servlet, rather than re write to load
from wicket, see what i did

add(new Image("imageFromServlet", new ServletImageDynamicResource());

private final class ServletImageDynamicResource extends DynamicImageResource
{

private byte[] imagegif = null;

protected byte[] getImageData() {
if (imagegif != null) {
return imagegif ;
}
imagegif = loadGIFData();
return imagegif ;
}



private final byte[] loadGIFData() {
ByteArrayOutputStream outgif = new ByteArrayOutputStream();
InputStream in = null;
try {

java.net.URL url = new java.net.URL("
http://localhost:8084/app/imgservlet";);
URLConnection huc = url.openConnection();
huc.setRequestProperty("user-agent", "Mozilla(MSIE)");
in = huc.getInputStream();

int i = 0;
while((i = in.read()) != -1 )
{
outgif.write(i);
}

} catch (IOException ex) {
ex.printStackTrace();
} finally{

}
}
return outgif.toByteArray();
}
}

On 9/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
>
> On 9/9/07, Doug Leeper <[EMAIL PROTECTED]> wrote:
> >
> > I am looking for an example that obtains an image from the db and
> displays
> > it.  Can anyone point me in the right direction?  I couldn't find the
> cdApp
> > in wicket-contrib-examples
> >
> > I know that I need to use a Resource or some derivative of one, but I
> want
> > to make sure that the Image is not stored in session.  I am converting
> an
> > existing JSP/Pageflow project to Wicket and have used a specific servlet
> to
> > stream the image but not sure how to do in Wicket.
>
> That cdapp example shows you how you can do that. Didn't change much
> between 1.2 and 1.3 I think.
>
> Eelco
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Image from DB example

2007-09-09 Thread Eelco Hillenius
On 9/9/07, Doug Leeper <[EMAIL PROTECTED]> wrote:
>
> I am looking for an example that obtains an image from the db and displays
> it.  Can anyone point me in the right direction?  I couldn't find the cdApp
> in wicket-contrib-examples
>
> I know that I need to use a Resource or some derivative of one, but I want
> to make sure that the Image is not stored in session.  I am converting an
> existing JSP/Pageflow project to Wicket and have used a specific servlet to
> stream the image but not sure how to do in Wicket.

That cdapp example shows you how you can do that. Didn't change much
between 1.2 and 1.3 I think.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Image from DB example

2007-09-09 Thread Jonathan Locke


perhaps blobimageresource or something like it.


Doug Leeper wrote:
> 
> I am looking for an example that obtains an image from the db and displays
> it.  Can anyone point me in the right direction?  I couldn't find the
> cdApp in wicket-contrib-examples
> 
> I know that I need to use a Resource or some derivative of one, but I want
> to make sure that the Image is not stored in session.  I am converting an
> existing JSP/Pageflow project to Wicket and have used a specific servlet
> to stream the image but not sure how to do in Wicket.
> 
> 
> Thanks in advance,
> - Doug
> 

-- 
View this message in context: 
http://www.nabble.com/Image-from-DB-example-tf4410796.html#a12584341
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Image from DB example

2007-09-09 Thread Doug Leeper

I am looking for an example that obtains an image from the db and displays
it.  Can anyone point me in the right direction?  I couldn't find the cdApp
in wicket-contrib-examples

I know that I need to use a Resource or some derivative of one, but I want
to make sure that the Image is not stored in session.  I am converting an
existing JSP/Pageflow project to Wicket and have used a specific servlet to
stream the image but not sure how to do in Wicket.


Thanks in advance,
- Doug
-- 
View this message in context: 
http://www.nabble.com/Image-from-DB-example-tf4410796.html#a12582968
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]