Hi there,
tried again this morning. I notice a funny behaviour in the
Wt::WPainter::Image object. I tried with a wider variety of images, both
png and gif, using the
Wt::WPainter::Image (const std::string &url, const std::string &file)
constructor and being file the spoolFileName.
The summary of the results is the following:
- image1.png, size: 8 KB; exception thrown in WPainterC (line 134). x
and y sizes seem to be 0. Progressbar stopped at 94%. This is the one I was
referring to yesterday.
- image2.png, size: 59 KB; loaded and displayed correctly
- image3.png, size: 20 KB; loaded and displayed correctly
- image4.png, size: 113 KB; loaded and displayed correctly
- image5.png, size: 250 KB; the programs seems not to be performing any
action; idle. No image loaded nor displayed correctly. Progressbar at 0%
- image6.gif, size: 16 KB; loaded and displayed correctly
- image8.gif, size: 37 KB; loaded and displayed correctly
- image7.gif, size: 124 KB; loaded and displayed correctly
- image9.gif, size: 2.65 MB; the programs seems not to be performing any
action; idle. No image loaded nor displayed correctly. Progressbar at 0%
I don't know whether saying that, at least for GIF images, it might be
related to the size is to venture too much. For PNG images, I am simply at
a loss.
Is there any way to set a limit in the size of the file being uploaded?
Thanks,
JON HAITZ
On 10 June 2013 17:27, Jon Haitz Legarreta <jhlegarr...@vicomtech.org>wrote:
> Dear Koen,
>
> I have added the stealSpooledFile() call before the
> m_FileUpload->uploaded() event is triggered, and I have also tried
> providing the Wt::WPainter::Image constructor with the local path of the
> image I am trying to display but none of this works :-S.
>
> And the same size-related exception is being thrown.
>
> JON HAITZ
>
> P.S.: Can I know where and what type of file the temporary spoolFileName
> points at? As I understand it, the spool file should be kind of transparent
> to the user, isn't it?
>
>
>
> On 10 June 2013 17:05, Koen Deforche <k...@emweb.be> wrote:
>
>> Hey Jon,
>>
>> Does 'file' indicate the correct file type and format?
>> Note that you need to 'steal' the spool file if you intend to use it;
>> otherwise Wt will delete it afterwards, perhaps this is the problem
>> you're facing now?
>>
>> Regards,
>> koen
>>
>> 2013/6/10 Jon Haitz Legarreta <jhlegarr...@vicomtech.org>:
>> > Yes, thanks for the tip, I had already read it in an older forum post.
>> >
>> > Unfortunately, it is a PNG image :-S
>> >
>> > JON HAITZ
>> >
>> >
>> >
>> >
>> > On 10 June 2013 16:34, Koen Deforche <k...@emweb.be> wrote:
>> >>
>> >> Hey,
>> >>
>> >> 2013/6/10 Jon Haitz Legarreta <jhlegarr...@vicomtech.org>
>> >>>
>> >>> Hello again,
>> >>> well, I have digged into the WPainter class, and the class is unable
>> to
>> >>> retrieve the image size: size.x() and size.y() are 0, so the
>> exception in
>> >>> line 134 is thrown.
>> >>>
>> >>> Now the value of the fileName argument is
>> >>> fileName = "C:\Users\JHLEGA~1\AppData\Local\Temp\wt-5826.tmp"
>> >>>
>> >>> which is the spoolFileName given by WFileUpload's corresponding
>> method.
>> >>
>> >>
>> >> Only png and gif images are currently supported for this constructor;
>> >> perhaps it's none of those?
>> >>
>> >> Regards,
>> >> koen
>> >>
>> >>
>> >>
>> >>
>> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> witty-interest mailing list
>> >> witty-interest@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/witty-interest
>> >>
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > witty-interest mailing list
>> > witty-interest@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/witty-interest
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> witty-interest mailing list
>> witty-interest@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest