-
Posts
4,077 -
Joined
-
Last visited
-
Days Won
87
Everything posted by horst
-
[SOLVED] getimagesize doesnt work when fed image from repeat field?
horst replied to picarica's topic in General Support
It needs the image filename and not a url. The php function getimagesize works for files in the systems filesystem. But why do you not use the $image->width and $image->height properties when you already have the $pageimage object. Why invoking an additional call to an external function when all you want to know is already there? -
Yep!!! ? I'm not sure. Maybe I haven't use this function in the last 5 years. I will try to look at it in the next days.
-
This was a try to automatically detect the colors and hue and create a grayscale watermark text. A full file path to a TTF-fontfile can be passed as param to the function. Here you can read about the function in general:
-
At first: Please look at the settings for this CKE field(s). There are checkboxes for showing or removing images without view access for guests. Second: check the access rights for (repeater)templates and its containing image fields!
-
yep, it stores them as regular pageimage variations and you can remove them by hand when opening "variations" in an image inputfield. You also can remove them by calling the core method $image->removeVariations(), but this also removes other variations like the adminThumbnail and maybe variations from CKE-fields and others. Therefore there is the pim2Load('ALIAS')->removePimVariations(), so that you can remove only the pimvariations for that specific alias name. If you are in experimental mode with pim2, you have the option to load it with a second param (called $forceRecreation in the API page) that automatically refreshes this single variation. If you use a specific options array as second param with pim2Load(), you can set $forceRecreation as third param. ? $image->pim2Load('wm', true)-> ...
-
It is working as expected since the positioning first was implemented. Here is the announcement post: There is also a tip and a photoshop action for download available in the second post of the thread. Do you use lowercase? https://github.com/horst-n/PageImageManipulator/blob/master/ImageManipulator02.class.php#L151-L162 If not please try with lowercase and report back. ------ No there are no API differences, only the opening method is different: $image->pimLoad() becomes $image->pim2Load(). Thats all. I changed the title of the first post for more clarity.
-
With the module PageimageManipulator you can find a description for "watermarkLogo" that will result in a code like this in your template file: $frame = $pages->get('/settings/')->watermark; foreach($images as $image) { $wmImage = $image->pim2Load('wm', ['quality'=>100, 'sharpening'=>'none', 'defaultGamma'=>-1])->watermarkLogo($frame, $position='NW', $padding=1.5)->pimSave(); // do something with $wmImage } You can find the API explained here (look out for watermarkLogo): And there is a post about simple text here: https://processwire.com/talk/topic/4264-page-image-manipulator-1/?tab=comments#comment-41989 But if you want to use simple text on the images, it would be better not to use my module. Instead try Ukyos avbImage! There is more and better support for simple text watermarks:
-
NAMESPACE - NAMESPACE - NAMESPACE - NAMESPACE ? <?php namespace ProcessWire;
-
Looks to me that we always have to provide a template object and not a templates name when not in template file scope. The reason why this is working in template file scope may have to do with some extra work and attention of pw behind the scenes in template file scope. (like outputformatting etc.) But this is only my intuitive idea, no valid technical description. ?
-
ProCache nt working - always creates new files
horst replied to KG Euroregion's topic in General Support
Have you also checked the entries in the root .htaccess file, if they are correct? -
Let all your code you need to run twice in the root of _init.php. Wrap all other, like the include_once of the _functions.php into a superglobal var condition, or, if the include of the _functions.php is the only issue you have, you can wrap this in a condition with function_exists: if(!function_exists("aFunctionNameThatExistsInFunctionsPhp")) include(__DIR__ . "/_functions.php");
-
Its coming in Safari and iOS-Safari https://caniuse.com/?search=webp%20image versions 14 TP and 14
-
https://jakearchibald.com/2020/avif-has-landed/
- 3 replies
-
- 13
-
Maybe a bit OT: with which php version is the script processed, and which set of modules are enabled for the php processor? Is it the same version the webserver is running on?
-
Is there a module to compare permissions by roles side by side?
horst replied to Ivan Gretsky's topic in General Support
Maybe it is this? -
if you are in PHP scope here, you cannot use the dot ($file.download()) but need to use -> for $file->download()
-
Yes, this is what I meant.
-
Just a thought: How do you overwrite the files? Do you pass them through the UI mask in admin? If yes, have you set the file field in the system template for translations to be allowed to override existing files on upload? If I remember right, I once had to do that in a similar situation, (but not sure).
-
The date field has HTML markup wrapped around the date. Can you make a csv file that has the blank datefield? Like with the PHP function strip_tags(), so that you only have the 22/10/2012 as values.
-
White background on GIF turns into rgb(252, 254, 252)
horst replied to 2hoch11's topic in General Support
Uh, how ugly! - Every your settings are looking good. I believe there is no possible solution within the imagesizer itself. Whats about uploading a bigger original image and don't use / allow upscaling? -
White background on GIF turns into rgb(252, 254, 252)
horst replied to 2hoch11's topic in General Support
Which PHP / GD version? What are your settings for the image sizer in the site/config.php ? Have you changed the default settings (contained in wire/config.php)? You may experiment with these settings: 'defaultGamma' => -1, // defaultGamma: 0.5 to 4.0 or -1 to disable gamma correction (default=2.0) 'defaultGamma' => 2.2, // defaultGamma: 0.5 to 4.0 or -1 to disable gamma correction (default=2.0) -
Has your root .htaccess file made it through the FTP program into the online host? Please double check if it is in place there. Some FTP programs have filters that hide and exclude dot files from transfers per default.
-
How to prevent a page from being fetched via API while it's deleting?
horst replied to bracketfire's topic in API & Templates
No, but have you tried to set the page status to be unpublished, save it, then delete it?