-
Posts
4,077 -
Joined
-
Last visited
-
Days Won
87
Everything posted by horst
-
Regarding No. 2 and in addition to @LKs answer: sender_reply
-
Hi, I have figured out that the LIBs I have ported to a PW module somehow interprets your background color as a transparent color index, OR as not changed imageparts that could be removed from the next slide(s). So, as it is definetly wrong, I'm not able to support the original LIBs. Maybe you can try to contact the original author? If not, I will put this on my ToDo. For now I only can tell you a not very conveniant workaround. I have found out that, if the backgrounds of the slides have some noise, it works as expected. But it increases the final filesize significantly (400%)! BTW: welcome to PW
-
There is no special php code. The module, once it is installed, hooks into PWs core Pageimage / ImageSizer and automatically should detect and handle animated GIFs. It should work with the normal API calls, like $image->width(320). So, your example variation looks a bit weird. Can you give some more infos about PW Version, PHP Version, other image related installed modules, please?
-
could i use default language for non-English language ?
horst replied to adrianmak's topic in Multi-Language Support
hmm, but when you search and find answers, why opening a new thread with the same exact question, why not post to one of the allready existing threads? It would be much better in regard for followers and the forums structure. https://processwire.com/talk/topic/9322-change-default-language-for-homepage/ -
Maybe it only works if you first publish it and edit it later in a second step.
-
I think it has nothing to do with staff or member status. On your screenshot you see kongondo also without a badge and he belongs to staff. My own experience is that, everytime I tried to get such a modules badge into a post of mine, IP.board doesn't do it for me. (But I'm staff, too) I think I haven't done it right or IP.board is a bit weird here. And there are other examples where members (not staff) have badges of request in the subject. I will try to update one of my modules first posts without a badge to get a badge displayed and come back here to tell you what happened. EDIT: now I was able to get a module badge in the subject of WireMailSmtp. Before it wasn't shown. Also I saw Module-Threads from Ryan without badges. Maybe this badge thing is an addition that once came along with an IP.Board upgrade as the forum allready contained a lot of threads.
-
A quick test shows it works fine for me with GD if I use 24bit PNG with transparency as overlay. I used this code for the final image: $img->crop("width=300, height=200, quality=100")->pimLoad('graywm')->setQuality(90)->grayscale()->watermarkLogo($wm, 'c', 0)->save()->url original image cropped via pia + = using Pim to grayscale + transparent png overlay with colored area the result looks good to me ---- Going one step further and using a pure grayscale overlay (with gray area, not a blue one) enables to change the color on the fly and produce different outputs: $color1 = array(100, 100, 0); $wmColor1 = $wm->pimLoad('color1')->setQuality(100)->grayscale()->colorize($color1)->save(); $img->crop("width=300, height=200, quality=100")->pimLoad('color1')->setQuality(90)->grayscale()->watermarkLogo($wmColor1, 'c', 0)->save()->url original + grayscaled using Pim + overlay in gray final image with yellow colorized overlay ------- @Pierre-Luc: maybe there are parts I'm not aware of in your case, but GD isn't that bad in many regards. So, it is very bad in regards of transients and smooth transparencies when it comes to dynamically create and overlay parts. EDIT: Ah, sorry, I have not looked / read very thoroughly your post. You want use composites with modes and that isn't handled at all by GD. It is not a simple overlay with transparency.
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
horst replied to David Karich's topic in Modules/Plugins
Is it possible to exclude pages from the HTML-minifying per template? -
I definitely go with PWs API first. I always follow the strategy that the original uploaded image never gets outputed as is. Therefore I'm able (and it is highly recommended) to upload images with full quality! (Photoshop JPEG: Quality = 12) You need to keep full quality (PW: quality = 100) for every intermediate step. Only with the last step, that produces an image for output, you need to apply a lower quality setting, e.g. 80. Example manipulation with watermarking, (using PW API with PageimageManipulator): // create ImageObject from fullsize WatermarkImage $wmPng = $pages->get('/mytoolspage/')->watermark; // create a fullsize image with watermark and quality 80! (the global $config->imageSizerOptions quality is set to 80, so don't need to set it here again individually) $image->pimLoad('full')->watermarkLogo($wmPng)->pimSave(); // create a medium sized image with watermark and quality 75! $wmPngMedium = $wmPng->width(960, array('quality'=>100)); $image->width(960, array('quality'=>100))->pimLoad('medium')->watermarkLogo($wmPngMedium)->setQuality(75)->pimSave(); // create a small sized image with watermark and quality 68! Now we first apply the (full) watermark and scale down afterwards: $image->pimLoad('small')->watermarkLogo($wmPng)->setQuality(100)->pimSave()->width(480, array('quality'=>68)); . If you want apply those or other manipulations direct on upload, you can go this way: // is called on hook: addHookBefore 'InputfieldFile::fileAdded' public function prepareUploadedImage($event) { $inputfield = $event->object; if ('images' != $inputfield->name) return; // we assume images field !! name of the field is: images !! otherwise change it $p = $inputfield->value['page']; // get the page if ('album' != $p->template) return; // don't do it on other pages than albums $image = $event->argumentsByName("pagefile"); // get the image // do the image manipulations $image->size(900, 600); $image->size(600, 400); $image->size(300, 200); ... } If you want to apply the watermarks on uploading, you have to use the identical API calls in the autoload module than you do in the templates: // is called on hook: addHookBefore 'InputfieldFile::fileAdded' public function prepareUploadedImage($event) { $inputfield = $event->object; if ('images' != $inputfield->name) return; // we assume images field !! name of the field is: images !! otherwise change it $p = $inputfield->value['page']; // get the page if ('album' != $p->template) return; // don't do it on other pages than albums $image = $event->argumentsByName("pagefile"); // get the image // do the image manipulations $image->size(900, 600); $image->size(600, 400); $image->size(300, 200); // create ImageObjects from WatermarkImage $wmPng = wire('pages')->get('/mytoolspage/')->watermark; $wmPngMedium = $wmPng->width(960, array('quality'=>100)); $wmPngSmall = $wmPng->width(480, array('quality'=>100)); // create variations with watermark $image->pimLoad('full')->watermarkLogo($wmPng)->pimSave(); $image->width(960, array('quality'=>100))->pimLoad('medium')->watermarkLogo($wmPngMedium)->pimSave(); $image->width(480, array('quality'=>100))->pimLoad('small')->watermarkLogo($wmPngSmall)->pimSave(); } . You can also use Pia within those chains if you like to use one of her shortcuts: $image->contain("square=1200, quality=100")->pimLoad('max1200')->watermarkLogo($wmPng)->setQuality(75)->pimSave(); . Summary: upload quality = 100% every intermediate quality = 100% final quality = is the only quality lower than 100% This way you produce very fine images, even with GD-lib.
-
I quick way could be to first google: https://www.google.de/search?q=detect+charset+of+file&ie=utf-8&oe=utf-8&gws_rd=cr&ei=1zMmVbL4GMziauzZgegC#q=detect+charset+of+file+PHP And then put up one of the links. WIth your question you wil find some pointing to the PHP-Manual (mb-detect-encoding) and to StackOverflow: http://stackoverflow.com/questions/505562/detect-file-encoding-in-php
-
Hi Andi, 1) Thanks for the links and for the useful part of the informations. 2) I (personally) allready haveused GraphicsMagick a year ago. In the above post it was said in the past (at least I tried to do so). Besides that: I have used a lot of other image processors in the past 15 years too. But I cannot see any usefullness with installing a software that only integrates image processors. If I want to evaluate the quality of image processors, I use the image processors. 3) GraphicsMagick does a (maybe very) good job, but IMHO it isn't the best tool out there. The best tool in regard of visually quality for photos is NETPBM! - if one know how to use it. 4) And sorry if I have posted in a way that not let you see what I have meant in the first place. What I have tried to do with the imagickresizer, and also have tried to say in the newer posts here, was to bring in a next step of image processing for a wide range of users. It should not only be available for those who are on their own servers. So using apt-get install... isn't an option for all that are not on their own servers. 5) Please do not assume what I have done, nor what I have done not. This is neither purposeful nor pleasing to read. My short and precious free time I like to spend rather different. Maybe with programming something (or doing other) that is useful for PW and a wide range of PW-users. 6) I'm available for paid PW modules development. I allready have built some nice custom ones in regard of image processing. Horst
-
Maybe because it isn't widely used in shared host environments. I also only have heard of it here in the forums some time ago. IMagick is the most available image processor (wrapper) after GD-lib. This was the reason to try to make it usable for PW. If people could select / decide which processor gets installed in their hosts, I would be happy to use GraphicksMagick, or one of GraphicksMagick, ImageMagick or NETPBM via the commandline, but this is also not widely usable.
-
I have a PW 2.5.23 with SessionDBHandler and ForgottPassword running without problems. Everytime getting the right forms and all works as expected.
-
This module also isn't compatible with PW 2.5, because there were many changes in the ImageSizer and Pageimages modules after this was built. About what the providers allow or not I cannot say much. At least my knowing is that mostly all PHP installations have GD lib (bundled). Then on second place much of them have IMagick installed / enabled, because it is a PHP-extension that acts as a wrapper / proxy between the customers php scripts and the ImageMagick-Application. This is because on shared hosts mostly the exec(), system(), passthrough() functions are disabled for security reasons. But to trigger ImageMagick you would need exec(). The support for IMagick is like zero. I have one issue pending (regarding not detecting transparency in one sort of PNGs), I couldn't find any helpful answer. And even if you found a running installation of IMagick, the different IMagick / ImageMagick Versions look like a hell to me. There are plenty function one need to query infos about the loaded image but they simply doesn't return anything. It looked to me that some of those functions are only implemented as placeholders, returning simply nothing in regard of the actual images.
-
I'm not sure I understand correct. You say it does work if the client is a desktop browser, but it does NOT work if the client is a mobile? This is with the exact same code? If the above are all yes, it would be interesting to know how the the mobile clients interacting differs from that of the desktop client. Could you try it with different mobiles? (iOS and Android) Is this upload page accessible or can you make it accessible for me? If so, you can PM me.
-
It should work on localhost too, but it needs pageViews to get triggered, (but you know that). No, I think deleting the LazyCron.cache file doesn't matter. Only that with the Lock file I have had, and there it has helped to reanimate it.
-
Ivan, you should have a look into the sites/assets/cache folder. If you can find a file there called LazyCronLock.cache, it is a sign that LazyCron once has started, but get not finished. To see when it has started, you may have a look to file date lastmodified, or look into it, it only contains a unixtimestamp. The reason(s) why it doesn't get finished could be that a script gots crashed / interrupted badly, - that a script is running in an endless loop, - or something that like.
-
. Hhm, hard to believe. It uses the same functions and params as you can use with the core ImageSizer. . . . . The PiM is a bit outdated. The function you suggested is missing, I know. But I have no time at the moment to work on this. . . . . The core ImageSizer does not support canvas. But there is one other API-level ImageTool available: Pia. With it you can use $image->contain(), what reduces both sizes (width and height) to fit into given boundaries. .
-
Maybe you should post also into that module thread to put recognition on it. Maybe a post as a summarize from here or only just linking to this thread here: https://processwire.com/talk/topic/2074-module-page-edit-field-permission/
-
Hhm, the modules page does not have the flag for PW 2.5: http://mods.pw/34
-
The Question is why do you have two classes with the same name: "PageEditFieldPermissionConfig"? One in the sites module directory and now there seems to be one in the core too? Can you have a look to this? Ah, I have edited your error and wrapped it into different lines, Now we can read it better: It isn't about two classes, it seems to have two methods with the same name: Compile Error: Cannot redeclare PageEditFieldPermissionConfig() (previously declared in /home/.sites/24/site1275/web/site/modules/PageEditFieldPermission/PageEditFieldPermissionConfig.php:8) (line 69 of /home/.sites/24/site1275/web/site/modules/PageEditFieldPermission/PageEditFieldPermissionConfig.php) Please have a look into site/modules/PageEditFieldPermission/PageEditFieldPermissionConfig.php at line 8 and at line 69, it seems that those lines both want to declare a method (or class) with the same name: PageEditFieldPermissionConfig.
-
, many thanks! This is fixed now in the Github repo.
-
Unexpected behaviour of field dependency and checkbox field
horst replied to Juergen's topic in General Support
I believe the CheckboxFields can have a different value than 1. When building Forms with the API I can set $field->value => 2, if I want or need it. You should check which value your Field really has when checked. -
Ah, thanks. https://processwire.com/talk/topic/5040-events-fieldtype-inputfield-how-to-make-a-table-fieldtypeinputfield/
-
I do not update older installations with new releases until I want to add some of the newer features. I today run sites with PW 2.3. There is no security reason to update those.