Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 21. Nov 2024, 23:24

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: 29. Oct 2010, 21:37 
Offline

Joined: 29. Oct 2010, 21:32
Posts: 27
Here's what I want. (Great application btw!) The site itself will be password protected as this is a private site. In other words there is no username for the site, just a password question like 'What is my birthday?" and only people who know me will be able to access the site.

Once people get past the initial password, they can view everything and upload only to a specific folder created for uploading. (I sort through the pictures people upload there later.)

I thought perhaps of creating a user with upload privileges and linking that user to the folder for uploading, and then have that user be automatically logged in when the folder is selected. (I don't want people to have to enter another password to upload or enter any username/password combo at any time.)

But I don't know how to have a user automatically logged in like that. Is it possible? Or is there another way of doing what I want?


Top
 Profile  
 
PostPosted: 30. Oct 2010, 01:56 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I have implemented something like that in combination with JFU.

check
http://www.tinywebgallery.com/en/faq.php#h52 - New 1.8 - I have not tested this without the multi root. But you can ;).

- Michael


Top
 Profile  
 
PostPosted: 30. Oct 2010, 10:20 
Offline

Joined: 29. Oct 2010, 21:32
Posts: 27
Great - I used a standalone install of JFU and linked to an 'upload.html' file containing the javascript in the JFU folder from the folder.txt file where I want to give people the link to upload. This bypasses the backed/frontend uploader in TWG altogether, and seems to work well. It's great I can put all kinds of html in folder.txt, including javascript!

However, I have another problem. I want photos to be upsized as well as downsized to a specific size. So I have selected 1280 say as the only resize option on the flash uploader. That's fine for files larger than 1280, they get downsized. But files smaller - they aren't changed in size. The reason I want to do this on upload is that I find the resizer in TWG that resizes on the fly in Galleries to be not very good quality, it doesn't seem to use a bicubic algorithm for example. So I'd prefer to have all my images upsized as well. I could do this manually before uploading but that's a pain, and my users might not do it.

There must be a way of implementing this?


Top
 Profile  
 
PostPosted: 30. Oct 2010, 11:10 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
JFU uses the same function for resize as TWG. If you like better quality than gdlib you can switch to image magick which is supported by TWG and JFU.

you can also increase the quality by setting the compression factor (only in TWG - in JFU is is set to 80 currently - I have added a variable for this in my local build already)

Best,
Michael


Top
 Profile  
 
PostPosted: 30. Oct 2010, 12:16 
Offline

Joined: 29. Oct 2010, 21:32
Posts: 27
I am already using Image Magick.

The issue is not the compression ratio (which I had already increased slightly), it's the lack of bicubic etc resizing. When smaller images are made larger you can see the jaggies.


Top
 Profile  
 
PostPosted: 30. Oct 2010, 13:31 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
check the options of image magick:

http://www.imagemagick.org/script/comma ... nterpolate

Is this what you are looking for?

Look for "-quality" in my code. There you can add the option. If you have a much better result please let me know. I then add this to my code as well.

- Michael


Top
 Profile  
 
PostPosted: 30. Oct 2010, 17:58 
Offline

Joined: 29. Oct 2010, 21:32
Posts: 27
I found "-quality" in the following files:

info.php (twice)
tfu_helper.php (twice, the second time because I have TFU as a separate install)
imagefunctions.inc.php

I added "-interpolate bicubic" to tfu_helper.php and noticed a slightly increased uploading time (more processing to do).

I added "-interpolate bicubic" to imagefunctions.inc.php but didn't notice any difference in the quality of images that are increased in size. You can see what I mean form the screenshot I took <a href="http://www.raasay.org/imagemagick.jpg">here</a> - look at the bald guy's head. You can see that no interpolation was performed when the image size was increased. It definitely should have improved.

Is there a way I can check for sure that image magick is being used for the resize? It is set in the options but it seems worthwhile checking.


Top
 Profile  
 
PostPosted: 30. Oct 2010, 18:17 
Offline

Joined: 29. Oct 2010, 21:32
Posts: 27
OK, so I discovered image magick was NOT set in my config.php - I forgot I had since reset a lot of settings. I set it, and that fixed things. For purposes of comparisons, here are three comparisons:

Image Magick switched OFF (GD I guess doing the resize):
#removed_broken_link

Image Magick switched ON WITH -interpolate bicubic:
#removed_broken_link

Image Magick switched ON using default settings (no -interpolate):
#removed_broken_link

As you can see, Image Magick is a HUGE improvement, not just in the jaggedyness but in the colours as well. It's debateable though whether adding -interpolate really adds any quality. It might be nice though to have more of image magick's command line options available in config.php. And definitely I would tell your users to install Image Magick for overall quality if they can!


Last edited by noetus on 6. Nov 2010, 08:55, edited 1 time in total.

Top
 Profile  
 
PostPosted: 31. Oct 2010, 19:16 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
and it's faster as well ;).

- Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy