Chandan Pitta wrote:
> On 1/1/07, Duncan Webb <[EMAIL PROTECTED]> wrote:
>> Chandan Pitta wrote:
>>> Hi Duncan,
>>>
>>
>> I'm wondering about this line, why is a + ".jpg" at the end of the line?
>>
>> scaled_image_path = self.cache_dir + filepath.replace("/",
>> "_").replace(".", "_") + ".jpg"
> 
> For some reason imlib was having problems if the file name has a dot
> anywhere else except than the extension. For example
> my_trip1_10.10.2006.jpg is having problems. The only way I could avoid
> it was to covert the dots to underscores but then imlib also wanted an
> extension and would not write to my_trip1_10_10_2006_jpg, so I decided
> to add ".jpg" at the end. I guess it could have been done more
> elegantly by ripping out extension, converting to underscore and then
> re-attaching the extension, but did not bother.

I'm wondering about non-jpeg images, haven't tried png's for example.

>> It was you patch with, but using:
>> new_image = image.scale_preserve_aspect(config.WWW_IMAGE_THUMBNAIL_SIZE)
>> Which means that resize_image_to_square could go, but I see we need this.
>>
>> This means that I can now change freevo cache to create these images.
>> And this means that the library.rpy need to read the cached image size.
>> I'll let you know when this is done.
> 
> Excellent!

Already done :)

>> kaa.imlib2 uses tuples for sizes, so we should stick to tuples for the
>> sizes too. I haven't done these changes.
> 
> Yes using tuples makes sense, but how many files are affected? I think
> I can take a look at library.rpy but I guess there may be several
> places where code needs to be changed.

Not very many places, just library.rpy and maybe fileinfo.rpy

>> The other stuff was just a few extra prints, which are not needed.
>>
>>> Coming to the issue with your images from cache not showing up, did
>>> you patch the webserver.py with the patch I sent? Basically it this
>>> line available in src/helpers/webserver.py?
>>>
>>>     root.putChild(config.FREEVO_CACHEDIR.replace("/", "_"),
>>> static.File(config.FREEVO_CACHEDIR))
>> I missed this, as I had already done the changes, almost exactly the
>> same as you, so the patch was rejected. :(
> 
> Interesting. I am using the latest svn and everything is working fine.
> I even changed WEBSERVER_CACHEDIR to a different location and tested
> and it seems to be working fine. Can you do a quick test to see if
> twisted recognized the child resource by trying something like
> http://localhost:<your_port>/_home_chandanp_temp/ in your browser.
> Replace _home_chandanp_temp with what ever your WEBSERVER_CACHEDIR is
> pointing to (do a print in __init__ of library.rpy or somewhere just
> to be sure) with all "/" replaced with "_". You should be able to see
> the folder listing (if twisted has permission to that folder). If you
> see "404 - No Such Resource", then it is a problem with twisted.

I'm slowly getting the idea :)

I had missed some more lines from the patch, quite often parts are
rejected. Good to do an svn update, to check for conflicts and gzip
patches by email.

> A very happy and prosperous new year to you and all. Hope Freevo will
> see a new level of sophistication.

Happy new year to you too. Freevo has jumped a bit over the last few
months, mainly to people like you sending in patches and plug ins.
> 
>> The last revision is now 8889.

Now 8894, with web changes.

Duncan


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to