Jump to content

horst

PW-Moderators
  • Posts

    4,088
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by horst

  1. Maybe you can strip out $_SERVER['DOCUMENT_ROOT'] from the path: $urldir = str_replace($_SERVER['DOCUMENT_ROOT'], '', $dir); // echo '<img src="' . $dir . $file . '" />'; echo '<img src="' . $urldir . $file . '" />'; // or $urldir . "/" . $file ??
  2. have a look to the examples of readdir especially the #2. And regarding the long page load in admin with many images, you may also use a InputfieldFile. This way you can use API but without waiting for 160 images to load there thumbnails.
  3. @Joss: those spyders are very good, but when you buy one, use it often! The new generations of those uses a sort of organic colorfilters inside. The older ones have had glass filters. Those with glass works 10 - 20 years. Those with organic filters are unusual just after the guarantee period expired. (2 years and 3 month after I bought the last one for 270,-€ it was unusual). Now I borrow a 10 or 11 years old from a coleague when I need one. There are spyders available with glass inside for the cost of around 800,- €, ... sighh. Here are resources from the European Color Initiative for a visual calibration: http://www.eci.org/en/downloads you need to look for "Here you can find useful “monitor” downloads." @adrian: yes, matte, only matte! If I need to face painting I use the mirror in bathroom. And I'm a EIZO Fan. @Joss: that model you have selected reads very well in its description. I think it wouldn't be the badest decission. But it is always worth to do a lot recherche and read some good tests. EDIT: @Totoff: very good resource, thanks!
  4. Hi Martijn, you mean you have a module that outputs images of different aspect ratios in a visual weighted manner? This would be nice to have, once we have discussed on that already. Regarding the name 'logo' I'm not sure. Can we find a more descriptive one? visualWeighted is to long,
  5. #1: https://processwire.com/talk/topic/3278-core-imagemanipulation/page-2#entry78224 #2: $tempCopy = $origImage->size( $origImage->width, $origImage->height, array("quality"=>100, "sharpening"=>"none", "autoRotation"=>true) ); if ( @copy($tempCopy->filename, $origImage->filename) ) @unlink($tempCopy->filename); number two should be done via hook after upload, maybe file-added?
  6. this one is rock solid, it is developed since 2003, http://www.mysqldumper.net/features/
  7. In addition to @adrian: I would create a page and save all uploaded files to it. Then I would send an email to the user via WireMail and an SMTP extension of it! This way you or your client have control over the email account. (< regarding false spam detection) The rest depends on the client, if he would like to get all files right with the mail, I would send copies this to him. At least with the WireMailSMTP this is doable out of the box and works like a charm! (shameless, I know!) You can make this configurable for your client. e.g. if he has normal workdays he can tip a checkbox somewhere on his personal boss-settings page to get all files as attachments with the emails. If he want go for holiday he untip the box and only get notifications without attachments (to his handy!) Don't forget to offer this to him as a premium feature!
  8. @Pete: thanks for tracking this down! I have updated the module and changed the code by adding a check for the permission 'image-crop' here. (this needs further investigation, here it is a quick solution to stop the error.) If you can find some time, would you be so kind and test it if this work at your end?
  9. @Adrian: thanks for the feedback. Here she is a bit to modern I believe. I will change this soon!
  10. but my answer is (meant) in regard of "ease of use" ! lesser fields to type in or to select from centralized overview compared to no overview! etc.
  11. I think this is related to your other Topic here: https://processwire.com/talk/topic/8300-image-color-palette-generator/ Please do not open different Topics.
  12. @Pete: regarding your "test.jpg", you only need to build a name that matches the new naming conventions of PW core Pageimage. That way all is fine because PW will do the dishes for you. It takes care of all image variations belonging to an original image. You only need to tell the system that this is a derivative image. The naming scheme now is aware of suffixes. You simply can use the original filename and add a suffix to it. (in fact it isn't limited to only one suffix, it can have multiple of them). Following the original image is named basename.ext If you want create one or more derivatives you should go with this scheme: basename.-suffix.ext basename.-suffix1-suffix2.ext following i change your above example in a detailed manner: // define suffix, and fileformat if needed $suffix = 'yoursuffix'; // allowed are: a-z 0-9 and underscore !! not more! $ext = 'png'; // your desired outputformat $image = $page->images->first(); // get the image $info = pathinfo($image->filename); $dir = $info['dirname']; // dir to the page assets/files/ folder $name = $info['filename']; // basename without extension $ext = $info['extension']; // only if you want use the same fileformat as the original is !! // build the targetfilename and the URL $targetFilename = $dir .'/'. $name .'-'. $suffix .'.'. $ext; $targetURL = dirname($image->url) .'/'. $name .'-'. $suffix .'.'. $ext; $sourceFilename = $dir .'/'. basename($image->getThumb('thumbname')); // Now do your nice manipulations if the image doesn't already exist (we only want to convert it once) if (!file_exists($targetFilename)) { $modules->get('PageImageManipulator')->imLoad($sourceFilename)->setOutputFormat($ext)->setTargetFilename($targetFilename)->save(); // or this way $modules->get('PageImageManipulator')->imLoad($sourceFilename)->setOptions(array('outputFormat'=>$ext, 'targetFilename'=>$targetFilename))->save(); } echo "<img src='{$targetURL}' />"; . . Additionally, if you use Pia to assist you while developing a site, your code should ask her if you are actually online and like to refresh all images: // Now do your nice manipulations if the image doesn't already exist or if you (Pete) are actually online, testing something and want force recreate images if (!file_exists($targetFilename) || true === $config->imageSizerOptions['forceNew']) { ... I love it when a plan comes together!
  13. @tinacious: what do you get when you try: setlocale(LC_ALL, ($is_english ? 'en_US' : 'fr_FR.UTF-8'));
  14. beer wine whisky coffee-mug food film/video camera
  15. with PW version 2.5+ it can be done now: https://processwire.com/talk/topic/8386-image-animated-gif/
  16. @Pete: I'm not sure if I have updated the Pim after that post here: https://processwire.com/talk/topic/4264-release-page-image-manipulator/page-5#entry60648 possibly not. So best you do not pass your options with the class-init but with the ->setOptions($options) method or with individual methods ->setTargetfilename ->setOutputformat, Can you test it and report back please?
  17. Image Animated GIF v 2.0.2 Module for PW 2.5 stable or newer, but is obsolete for PW Versions greater then 3.0.89 (... read more ...) This module helps with resizing and cropping of animated GIFs when using the GD-Library. The GD-Library does not support this. This module is completely based upon the fantastic work of László Zsidi (http://www.gifs.hu/, builts the initial classes) xurei (https://github.com/xurei/GIFDecoder_optimized, enhanced the classes) I have ported it to a PW module and it works with core imagefields, together with Pia and with CropImagefields that uses the new naming scheme since PW 2.5. ------------------------------------------------------------------------------------------------------------------------------------------ read more in this post about the rewrite from version 1.0.0 to version 2.0.0 ------------------------------------------------------------------------------------------------------------------------------------------ You can find it in the modules directory: https://modules.processwire.com/modules/image-animated-gif/ and on Github: https://github.com/horst-n/ImageAnimatedGif ------ A preview can be found here
  18. Updated to version 4 - I had to fix the forceNew option what may be used during site develope. - also have changed a bit on the GUI: it detects if you have Fieldtype RangeSlider installed and uses that over a regular Integer Inputfield for Quality-Setting If you are already using it, please update too.
  19. @rajo: I cannot really follow the logic. To me it looks simply wrong and the opposite is true: a) actually we have that every parent page need: 1 entry for a special parent template name at templates setup (add one entry per different parent type) 1 entry for a special child template name at templates setup 1 entry for storing the parent template name on the page b) the way you want to change it would result in: 1 entry for a basic parent template name at templates setup (is used by multiple parents) 1 entry for a special child template name at templates setup 1 entry for storing the parent template name on the page +1 for storing a children template name on the page (what is very different compared to only one relation in family settings in the templates setup, or I'm wrong here?) Conclusion: Both solutions may use equal amount of DB entries to specify family relations, whereas b) seem to add some more as it delegates a setting from centralized templates setup (where it is defined only one time) onto the pages layer, what multiply these entries. So, a) needs more entries for template parent names, whereas b) only needs one parent template name here. - So lets say it is equal! with a) you have a centralized and informational overview on the templates setup page, whereas with b) some informations are hidden from there and also from everywhere. You will lost the overview of your family relation settings! thats all tolerable, may be, but not: Additionaly, if you want to create a new module for something what you allready can do, you put another layer of overhead to it the process. The module needs to hook into something and check and decide and may pass back or take it into its department, etc etc etc. !! So a) seems to be a good solution and b) seems at least to triple the noise here. Or have I got something wrong with this?
  20. <kidding>better not "the main concept" but "one of the main concepts"</kidding>
  21. thanks for the nice words. 1) unfortunately Pia only assist with preparing and delegating values to the images engines. She isn't able to process images by herself. What you are requesting is "canvas", it is provided by Pim. I don't know yet if Pia dynamically should support shortcuts depending on other installed modules or not. It can become a bit confusing. On the other hand I see how comfortable it could be if Pia would assist here too. 2) I will do so when finding a bit time for it. yes, she is!
  22. Glad it is working now for you! Your hosting company uses LiteSpeed and now PHP 5.5. It must have been a specific configuration problem there, because PW 2.5 is running fine on PHP 5.4. Any chance we can get to know what problem it was they have solved with changing the PHP version?
  23. Hi Marty, assuming you want to build a grid upon an unknown collection of images and you want to have full control, you may start with this construct and change it to suite your needs: echo "<br /><hr /><pre style='font-family:monospace;'>"; // only a little test unit $yourImagesArray = array( 1,1,1,1,1,1, 1,2,1,1,1, 1,1,1,1,1,2, 1,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,1,1,2,1,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,1,1,2,1,1,1,2,1,1,1,2,1,2,1,1,1,2,1); // build the grid $images = $yourImagesArray; // containing lots of images, most with no tag or a "single" tag and some with a "twice" tag! You have to make sure it contains enough images for your grid, so. $i = 0; for ($row=1; $row<=7; $row++) { echo "\n$row:"; // only for the test for ($col=1; $col<=6; $col++) { // get the next image from the collection $img = $images[$i++]; // you would use $images->eq(++$i) with real images here! if (6 == $col) { // only special case is with the last $col while (2 == $img) { // last $col cannot take a "twice"-image. For the example I simply drop all "twices" while searching for a single-one. $img = $images[$i++]; } } // now we have a valid $img for our grid, so create output if (2 == $img) { $col++; // adjust the $col counter! echo 'oo'; } else { echo 'O'; } } } // ready with grid echo "</pre><br /><hr />"; // only for the little test unit test output is: 1:OOOOOO 2:OooOOO 3:OOOOOO 4:OOooOO 5:OooOoo 6:OOOooO 7:OOOooO
  24. Nice one! Looks good - very good on FF33 Win7 Looks ok - good on IE11 Win7 (seems to be a bit slower than FF or is less smooth than FF) ------- Related to the Article: Which browsers should be supported by this? IE9+ ------- It remembers me on a site Fokke has created and posted to the showcase There are no overlays, only the movement and fading with the background images. There it is done a bit different, it seems to use different move directions (N, E, S, W) and also has a return point. Feels a bit more like "Ken Burns Effect". Would this be possible with your module too, defining direction per slide?
  25. Hi @Sephiroth, welcome to the forums. I have read your questions but am not able to give useful answers. I'm more comfortable with the images. But I'm sure you will get useful answers here.
×
×
  • Create New...