Manual Crop

Manual Crop - Effect instellenDe Manual Crop module voor Drupal 7 voegt 3 nieuwe afbeeldingsstijl effecten toe die het mogelijk maken van afbeeldingen, meteen na het uploaden, bij te snijden. Iedere afbeeldingsstijl kan specifiek bijgesneden worden, zolang deze maar één van de Manual Crop effecten heeft.

Na het installeren (en activeren) van de module gaat u naar Beheer » Instellingen » Media » Afbeeldingsstijlen en klikt u op bewerken bij de afbeeldingsstijl die handmatig bijgesneden moet kunnen worden. Vervolgens kan u één van de 3 nieuwe effecten toevoegen:

  • Manual crop: de gebruiker kan de afbeelding vrij bijsnijden, u kan alleen een minimum breedte en/of hoogte instellen;
  • Crop and scale manually: de afbeelding wordt naar de door u ingestelde breedte en hoogte bijgesneden, hierbij moet tijdens het selecteren de verhouding gerespecteerd worden.
  • Reuse a Manual Crop selection: hergebruik de selectie van een andere afbeeldingsstijl.

Manual Crop - Effect opties

Met de 2 eerste effecten wordt het mogelijk van de afbeelding bij te snijden, het 3de effect dient om de selectie van een andere afbeeldingsstijl te gebruiken als basis voor latere effecten. Voor de uitleg hieronder moet u dus één van de 2 eerste effecten selecteren.

Hou er rekening mee dat deze module geen minimum-dimensies voor het uploaden van de afbeelding oplegt. Als de gebruiker een te kleine afbeelding upload, wordt mogelijks de volledige breedte en/of hoogte geselecteerd indien deze kleiner is dan de door u ingestelde dimensie.

Het zal u ook opvallen dat het effect altijd bovenaan in de lijst komt te staan. Dit is omdat het bijsnijden logischerwijs altijd de eerste actie moet zijn, anders wordt het resultaat onvoorspelbaar.

Na het instellen van het effect op de stijl(en) gaat u naar Beheer » Structuur » Inhoudstypen en klikt u op velden beheren (de Field UI module moet hiervoor geactiveerd zijn) bij het inhoudstype waarvoor bijsnijden mogelijk moet zijn. In het volgende scherm klink u op bewerken bij het/een afbeeldingsveld. Op de daarop volgende pagina kan u onder het blokje “Manual Crop” de module voor dit veld inschakelen en instellen, waarna u de wijzigingen opslaat. Als laatste keert u naar het inhoudstypen overzicht terug en klikt u op weergave beheren waar u vervolgens de te tonen (bijgesneden) afbeeldingsstijl kiest. Dat was alles, veel succes!

Dit bericht werd geplaatst in Drupal modules, Open source en getagged met , , , .
Leg een link naar dit bericht.

50 reacties op Manual Crop

  1. Your module is amazingly simple and powerful, I’ve just finished trying everything that deals with this purpose for Drupal 7, and yours is the best by far. Can’t say thank you enough.

  2. Could you provide a demo on your site so that we can sample your module.

    • Matthijs zei:

      Hi, sorry for my late response… I’ll launch a demo site with/after the release of the next Manual Crop version. This update is only a few improvements away ;-)

  3. N1ckhead zei:

    this module is awesome! I’m surprised there are so few installs. This is so useful.

  4. Bill zei:

    hmm..shame. This isn’t working for me. I set everything up as you say. Get the pop up window, set the region for cropping, click save selection. The pop-up window closes and I save the post…but the image is not cropped. Any ideas?

    • Bill zei:

      OK..I see what I didn’t do.

      Matthijs can you add this step to your user guide above? The users needs to also set the ‘Manage Display’ in the content type. It was set to ‘original size’ and I should have set it to the image style I added the image crop to. Works well now…phew..

      but – another issue, well 2.
      1. if i remove an image from the node, then upload a new one, select manual crop, size the crop and save selection, i then save the post but get the error: “The crop selection for myfirstimage.jpg (medium image style) is invalid, please clear it or re-select.” This was the first image I had saved, now I am replacing it but can’t get passed this error message?
      2. If i upload a large image it’s too big for in the screen (on my laptop) and i can’t easily select the bit of the image i want. ANy ideas for improving this?

      otherwise very good simple module!

      • Matthijs zei:

        Hi Bill, I’ve added this additional step as requested! Concerning your second issue, I can’t reproduce it in the latest dev version, so it should be fixed ;-) Please let me know if this issue remains in the future!

  5. Alec zei:

    Is there a way to use manual-crop for profile images? I was thinking there would be some way to alter the input widget on a given form (in this case, the user registration form), but I don’t think I can do it through a standard hook_form_alter.

    • Matthijs zei:

      This is not possible, Manual Crop was designed for use with image fields only. Maybe there’s some other module that does this?

  6. Bob zei:

    Do we need to change any theme code to reflect the cropped images, the images that show are the original “non-cropped” images.

    • Matthijs zei:

      Hi Bob, you should update the image style that should be used to show the image. Do this by going to Administration » Structure » Content types and then clicking on manage display for the content type that needs to be updated.

  7. john zei:

    I’ve gotten this to work well with nodes, but I’m having trouble with images attached to terms. Is that a supported feature? I am pretty sure I’ve set it up correctly (the same as for a content type), but when I try to save any change to a taxonomy term form, nothing saves until I delete the cropped image field. So not only did the crop not apply and save, I’m unable to make any other changes to any other field. Maybe this situation is like the profile image, but taxonomy does use the image field. Any suggestions?

    Thanks

    • Matthijs zei:

      Hi John,
      The module had some issues with other content types then nodes, but these were fixed in the latest release. I’ll check and get back on this as soon as possible. Thanks for your report!
      Matthijs

  8. Grahor zei:

    Unfortunately, I need 2 more functionalities this module is apparently lacking: automatically call the cropping window on upload and on saving selection, change the preview of the image.

    Unfortunately, I can’t rely on users to understand what they have to do here. Otherwise, a great module.

  9. dinghua zei:

    Thanks….great work. We have been wanting to deploy your module but realized that we needed a minor extension and was wondering if you could help:
    * when the original image’s aspect ratio does not exactly match that of the crop frame, we need the option to fit either the full width or height into the crop frame.
    * ie. we may need to ‘fill’ a pre-defined background color or ‘transparent’ into the image in certain cases.
    currently, our understanding is manual crop will enforce and restrict scaling down of the original image to a point where the shortest edge (either width or height) will fit into the the crop frame and not beyond.
    PS: screenshots to explain more clearly:
    normal: https://skitch.com/dinghua/gnrre/image-picker
    we need: https://skitch.com/dinghua/gnrrm/image-picker

    ding hua,

    • Matthijs zei:

      Hi,
      Thanks for your feedback! I understand your “additional needs”, but could you create an issue on drupal.org so I don’t forget? :-) Or shall I do this for you? (If you don’t have a drupal.org account.)
      Regards,
      Matthijs

  10. HOSTGAME zei:

    Please, help me! Without this module I printed my image field with the aid of

    field_logo ['und'] [0] ['filename'];?>

    How I may now take my picture?

  11. ykyuen zei:

    very nice module. Thanks. =)

  12. rose zei:

    Hi,
    Installed “Mannual Crop “module in drupal 7,And also i added ccks field widget “mannual crop”,
    I added that node details nothing hapend in image uplaoding section?any one plz explain breafly.

    • Matthijs zei:

      Have you added the Manual Crop effect to your image style? To quote the steps above:

      You should go to Administration » Configuration » Media » Image styles and click on edit link for the image style you would like to have the Manual Crop effect. At this point you can add one of the 2 newly available effects:

      – Manual crop: allow users to freely crop the image, you can only enforce a minimum width and height selection.
      – Crop and scale manually: crop and scale the image to the width and height you’ve set, the user will be enforced to respect the aspect ratio.

  13. I just wanted to say thank you! This module is excellent and plays very well with field slideshow. It takes a few more minutes to setup than imagefield_crop BUT works a lot better in my opinion. The GUI is much more intuitive for my… shall we say…. non technical users. thank you so much!

  14. Tina Zhou zei:

    Thanks for your nice module.
    I have a problem when using this module: If i upload a picture and not crop manually then i click save, the problem happened, i can’t save it successfully and an error message like this
    “tes.jpg must have a cropping selection for the Product Thumbnail image style.”

    whether there some settings i should do or i must crop it before saving it?

    Thanks for your help.

    • Matthijs zei:

      Hi there, I’m glad you like it!

      Concerning your problem: you can set the required cropping selections in your widget settings, to change this go to Administration > Structure > Content types > manage fields (of the content type you wish to change). In that screen you click on edit by the Manual Crop image upload field, next look for the Required croppings field and deselect the selected style(s).
      After saving these changes your problem should be fixed.

  15. Orifhon zei:

    Hi Matthijs,

    I’m using Drupal 7 with Manual Crop module, it’s working cool on every browser except for Internet Explorer. The project that i’m doing is supposed to be supported by IE 8 and IE 9, i’ve done everything as in the Manual Crop tutorial as in your site. But the Manual Crop module is not working correct in IE family browser, when I select one of the manual crop types instead of showing cropping options in popup it’s opening in the same page without any overlay, and the view of the cursor is not changing.

    I’ve opened an issue at Drupal.org
    http://drupal.org/node/1593952

  16. Rajkumar GR zei:

    Thank you so much, its really helpful for me i tried more modules but its very nice and easy for UI Good module

  17. Michiel zei:

    Great module! Thanks!

  18. Chad Peppers zei:

    Best module I have found for drupal for cropping!

  19. azul zei:

    Your module is produce new image based on image style right?
    Could i request to crop image after upload then i use cropped image then in my views i use cropped image, i dont need original image to be saved

    • Matthijs zei:

      Hi,

      Manual Crop is based upon the default image style functionality, so the original image will always be stored… It’s not possible to remove the uploaded image, sorry!

      Matthijs

  20. Neil zei:

    This works really well within the node. I am also using views slideshow – unfortunately this is scaling the original image and not the cropped result so getting some very strange results. Any idea if this can be avoided? Great module by the way – Thanks!

  21. Neil zei:

    Sorry I figured it out: Reuse a Manual Crop selection. Awesome module!

  22. candela zei:

    hello

    thanks for your module. it was working perfect until i had to make some changes on the styles for a content type.
    now, only for that content type, the cropping selection it is not loaded when i edit a node. so, if you edit a node, you have to re-crop every image.
    i see, in the database, the table manualcrop saves for each fid the coordenates, but they are not loaded for that content type.
    can you please give to me a tip to solve this.
    thanks for sharing :)

    • candela zei:

      i realize that the problem comes when a content type uses ajax…
      thanks for your module :)

      • Matthijs zei:

        I’m afraid this module is indeed not 100% ajax compatible, if you want you can always create an issue at Drupal.org with the steps (and modules) to reproduce.

  23. jeana zei:

    If I want to create a thumbnail of another image that I have uploaded/cropped, do I have to upload the image again and manually crop it? Or is there a way to call the image I just uploaded, and then set the manual thumbnail crop based off of that image?

    Thanks

    • Matthijs zei:

      Because this module works image-style based, you have to re-upload the image or create a new image style with a “Reuse Manual Crop selection” effect, which uses the same crop selection as its base style.

      Matthijs

  24. Bonome zei:

    Hello,

    Is there any way to apply the crop on image file (a new cropped image is saved on hard drive) ? btw nice job for this great module.

  25. Amjad zei:

    Hi There,

    Is it possible to Just crop the height ?

    Like for example on our full nodes what we want is width to be fixed 640px but height can be dynamic ?

    Thanks for your help.

    Regards,
    Amjad

    • Matthijs zei:

      Hi Amjad,

      I guess this should be possible if you use the effect without scaling. You can set the required width/height and set the other dimension to 1.
      Next you should add a second effect (Drupal’s default resize and crop) to resize the width/height to the desired size.

      Hope this helps!

      Matthijs

  26. Sharon zei:

    Hello,
    We’ve been using this module for about a year when suddenly it stopped working. The manual crop is no longer available for a widget type in the field’s manage field’s widget so it isn’t available. However, i can select it from the Styles List in that field’s edit operations. I’ve updated to the latest release. Hoping it’s just a temporary glitch or a user issue on my end.
    Thanks
    Sharon

    • Matthijs zei:

      Hi,

      Did you install the database updates? Because the Widget has been dropped in favour of the default image widget with integrated Manual Crop functionality… So run update.php and verify your widget settings afterwards.

      Success!

  27. Michel zei:

    Hi Matthijs,

    Thank you for this great module. It works perfectly with the regular image widget.
    But when I enable it for the media file selector it does nothing. If I understand well your module integrates with the media module. Can you help me please?
    (Drupal 7.22, Manual Crop 7.x-1.x-dev)

    Bedankt!
    Michel

    • Matthijs zei:

      Hi Michel,

      Could you try again? The Media integration was partly broken and should now be fixed.

      Matthijs

      • Michel zei:

        Hi Matthijs,
        Sorry for my late reply. Thank you, I’ll try it soon and let you know.
        Cheers

  28. Francisco zei:

    Great module Matthijs!

    I am having an issue, non-admin users can’t use the Manual Crop functionality. I had to disable the “Required Cropping” option for the Manual Crop on the content type for non-admin users to be able to upload the image with a “random” crop.

    I checked for permission but did not see were I could allow different profiles for cropping/resizing the uploaded image.

    Manual Crop 7.x-1.4 & Drupal 7
    Could you please help?
    Thank you

    Francisco

Het plaatsen van reacties is uitgeschakeld.