Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt image processing settings to JoomIMGtools #65

Merged

Conversation

Elfangor93
Copy link
Member

The sheer volume of configuration options in the configuration manager may be confusing for JoomGallery users.
This pull request is intended to provide a better structure and explanation of the options concerning image processing. It introduces a new tab under the tab "frontend settings" called "image processing". All options concerning image processing can be found now in one of these two tabs for image processing options:

  • General Settings/Image Processing (This tab containing all image manipulation options which manipulate the images stored on the server [original, detail and thumb]. This options affect image upload and image manipulations triggered in the image manager.)
  • Frontend Settings/Image Processing (This tab containing all image manipulation options which takes place on-the-fly, in that moment when the image is requested. Here images gets manipulated befor sending to the browser without saving them on the server.)

The options are arranged in both tabs regarding the image that is affected from this option (original image, detail image, thumbnail). This is intended to result in a more logical structure of the options. The description of the options has been changed at some places so that they are better aligned to each other and correctly reflect the behaviour of the JoomIMGtools class.

Additionally a tool to check and optimize your currently set options was added.
It is placed on the bottom of the General Settings/Image Processing tab. This tool allows you to upload an image of your choice and apply your settings to the uploaded image creating versions of thumbnail and detail images. You can generate up to two versions of each image (ideally generated with different settings). The tool allows you to directly compair the two images generated and to see the resulting differences.
This way, the image processing options can be optimized for any application without the need to add images to the database. The images uploaded and created by this tool are stored in the JoomGallery tmp-folder. Only one image at a time can exist in the tmp-folder. If a new image is generated or uploaded, the old one is overwritten.

add the new argument "$unsharp" to all the JoomIMGtools::resizeImage() calls.
first commit - propably full of bugs
update script created, in order to adjust current settings according to the new configurations.
when upgrading from Version <= 3.5.x jg_maxheight doesn' exist. We need to set jg_maxheight equal to jg_maxwidth in this case.
It is not possible to register an already existing Class in php.
Thtas why JDatabase is used to store the updated configs instead of JTable...
Previews of the image walls (gallery, category, favorites, toplist view) that would be created using the specific setting value for thumbnail conversion.
PHP Notice:  Undefined variable: autorot_orig in ...\administrator\components\com_joomgallery\helpers\upload.php on line 2271
in order to fulfill backward compatibility
With the watermark position 'top left' with GD2 as image editor, the rest of the image was "darkened".
It is still not possible to add a resized watermark on an animated gif using IM.
based on the rearrangement, some references in other configuration descriptions has to change
@Elfangor93
Copy link
Member Author

Here is a short video for better understanding how the tool to check and optimize the image processing configuration is designed to work. Please leave a comment if you would like any changes in this behaviour or design of the tool.

optimize_settings.mp4

@Elfangor93 Elfangor93 added the needs testing This issue or pull request needs further testing label Mar 23, 2021
@MrMusic MrMusic added this to the v3.6.0 milestone Apr 4, 2021
@eumel1602
Copy link

In the area where you can "check and optimize your currently set options" I compared two images ("compare images"). In the pop-up window at the bottom left, I change the "width" to a size (pixel) that is larger than the size of my screen (e.g. 1500 width). Then the popup window is so big that I can't get the value reset. I can only close it at the top right!

bild1

Copy link
Member

@MrMusic MrMusic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show quality parameter.
The quality parameter is important for image quality so it should be saved/shown.
It's not finished but you should understand what I mean.

<p><strong <?php echo JHTML::_('joomgallery.tip', JText::_('COM_JOOMGALLERY_CONFIG_GS_IP_TEST_GENTIME_TXT'), JText::_('COM_JOOMGALLERY_CONFIG_GS_IP_TEST_GENTIME_LBL'), true); ?>><?php echo JText::_('COM_JOOMGALLERY_CONFIG_GS_IP_TEST_GENTIME_LBL');?>:</strong> <?php echo round($info->detailL->processing_time,3);?> sec</p>
<p><strong <?php echo JHTML::_('joomgallery.tip', JText::_('COM_JOOMGALLERY_CONFIG_GS_IP_TEST_GENMEMORY_TXT'), JText::_('COM_JOOMGALLERY_CONFIG_GS_IP_TEST_GENMEMORY_LBL'), true); ?>><?php echo JText::_('COM_JOOMGALLERY_CONFIG_GS_IP_TEST_GENMEMORY_LBL');?>:</strong> <?php echo round(($info->detailL->used_memory) / pow(1000,2),2);?> MB</p>
<?php else: ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add
<p><strong <?php echo JHTML::_('joomgallery.tip', JText::_('COM_JOOMGALLERY_CONFIG_GS_IP_TEST_QUALITY_TXT'), JText::_('COM_JOOMGALLERY_CONFIG_GS_IP_TEST_QUALITY_LBL'), true); ?>><?php echo JText::_('COM_JOOMGALLERY_CONFIG_GS_IP_TEST_QUALITY');?>:</strong> <?php echo ($info->detailL->used_quality);?></p>
to show the quality parameter

@MrMusic
Copy link
Member

MrMusic commented Feb 20, 2022

One more suggestion:
It would be nice if there was also something "to touch" at the top to be able to move the slider like at bottom.
image-compare-slider_klein

@Elfangor93
Copy link
Member Author

It would be nice if there was also something "to touch" at the top to be able to move the slider like at bottom.

Right now, this feature is realized with using pure HTML/CSS. The apperience of the slider is then done by the browser you are using. If we would like it more userfriendly, we need to use a javascript library to create the slider. This I wanted to avoid. Thats why it is like it is...

Image processing settings in the configuration manager: When popup window gets to big it was not possible to rescale the window anymore.
@MrMusic
Copy link
Member

MrMusic commented Mar 15, 2022

Right now, this feature is realized with using pure HTML/CSS. The apperience of the slider is then done by the browser you are using. If we would like it more userfriendly, we need to use a javascript library to create the slider. This I wanted to avoid. Thats why it is like it is...

OK, if it's not easy to change we can leave it as it is.

In the configuration optimization tool the quality parameter is added to the info screen
Styling of the resizer of the configuration optimization tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs testing This issue or pull request needs further testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants