Envato Tuts+ Community Challenge: Created by You, June 2018 Edition

Post pobrano z: Envato Tuts+ Community Challenge: Created by You, June 2018 Edition

Welcome to our monthly feature of fantastic tutorial results created by
you, the Envato Tuts+ community! 

Every day, visitors like you take the
time not only to read our tutorials but also to try them out. This is an
assortment of those comment submissions found throughout the Design
& Illustration section. Check out this set of results and join in
for the next roundup, published next month!

Vector Tutorial Results

Taken from the
comments section of your favorite tutorials, these first pieces are an
assortment of results created with vector drawing programs. Check out
these amazing results!

Create a Summer Portrait From a Stock Image in Adobe Illustrator

After studying this Summer Portrait tutorial from , Aaron created this beautiful, colorful design. See his work below!

Create a Summer Portrait From a Stock Image in Adobe Illustrator

Create Two Colorful Children’s Book Illustrations in Illustrator

Narcisa Didoaca took on this adorable Colorful Children’s Book Illustration from Mary Winkler, creating a lovely result of her own. Check it out!

Create Two Colorful Childrens Book Illustrations in Illustrator

How to Create a Cartoon Polar Bear Portrait in Adobe Illustrator

Monique Carrati cuddled up to this charming Cartoon Polar Bear Portrait, inspired by a tutorial from . See how she changed the colors below!

How to Create a Cartoon Polar Bear Portrait in Adobe Illustrator

How to Create a „BBQ Time” Concept Illustration in Adobe Illustrator

Caroll Boubou is all prepped for summer after taking on this BBQ Concept Illustration from . See her work below!

How to Create a BBQ Time Concept Illustration in Adobe Illustrator

How to Create a Tropical Pattern in Adobe Illustrator

Very pretty! Cheryl Ferrell couldn’t have created a more perfect version of this Tropical Pattern tutorial from instructor . Let’s take a look!

How to Create a Tropical Pattern in Adobe Illustrator

How to Create a Vintage Camera in Adobe Illustrator

Brenda Santoli did a wonderful job recreating this Vintage Camera Illustration from . See how she switched up the colors below!

How to Create a Vintage Camera in Adobe Illustrator

How to Create a Cherry Pie Text Effect in Adobe Illustrator

So cool! Medore Ruiz transformed this Cherry Pie Text Effect tutorial from into a delicious looking plate of pie. Check out her work!

How to Create a Cherry Pie Text Effect in Adobe Illustrator

How to Create a Canyon Illustration in Adobe Illustrator

Clever! Cindi Bane Gilmour added an extra funny element to this Canyon Illustration by instructor . Can you tell what it is?

How to Create a Canyon Illustration in Adobe Illustrator

How to Create a Spain-Inspired Text Effect in Adobe Illustrator

Alicia Hermelibus celebrated a good siesta with this Spain-Inspired Text Effect from . Check out her version below!

How to Create a Spain-Inspired Text Effect in Adobe Illustrator

How to Draw a Festive Theatre Stage in Adobe Illustrator

Reader Tanu Bedi achieved a stunning Theatre Stage Design by using this awesome Illustrator tutorial by . Try it yourself!

How to Draw a Festive Theatre Stage in Adobe Illustrator

Adobe Photoshop Tutorial Results

Let’s
take a look at this next set of results inspired by Adobe Photoshop
tutorials published here on Envato Tuts+. Contributions range from photo
manipulations to text effects and more! Check out these wicked results
below!

How to Create a Surreal Giraffe Photo Manipulation With Adobe Photoshop

Super impressive! Susana González Gutierrez aced this Surreal Giraffe Photo Manipulation from instructor . Check it out!

How to Create a Surreal Giraffe Photo Manipulation With Adobe Photoshop

How to Create a Sketch vs. Camera Effect in Adobe Photoshop

Very cool! Debayani Das nailed this Sketch vs. Camera Effect created by instructor . Check out her result below!

How to Create a Sketch vs Camera Effect in Adobe Photoshop

How to Create a Quick Mirrored Landscape Text Effect in Adobe Photoshop

Nice! Ano used this incredible Mirrored Landscape Text Effect from to illustrate his name creatively. See his version below!

How to Create a Quick Mirrored Landscape Text Effect in Adobe Photoshop

How to Create a 90s Graphical Photo Effect in Adobe Photoshop

Kat Silent did an amazing job with this 90s Graphical Photo Effect from . See her fantastic result below.

How to Create a 90s Graphical Photo Effect in Adobe Photoshop

Quick Tip: Create a Sports-Themed Text Effect in Photoshop Using Layer Styles

Khaldoon Megdadi tackled this Sports-Themed Text Effect from , adding his own unique take on the colors and textures. Check it out!

Quick Tip Create a Sports-Themed Text Effect in Photoshop Using Layer Styles

How to Create a Dragon Landscape Photo Manipulation With Adobe Photoshop

Hecton Eciro made an incredible version of this Dragon Landscape Photo Manipulation from instructor . Check out his design below!

How to Create a Dragon Landscape Photo Manipulation With Adobe Photoshop

How to Create an Enchanted Photoshop Action

User aio350 made this sweet bird sparkle by using this Enchanted Photoshop Action tutorial from . Check out their work below!

How to Create an Enchanted Photoshop Action

Design Tutorial Results

These final
pieces are inspired by an assorted of design tutorials that don’t quite
fit the previous categories. They include everything from print design
to drawing and more! Enjoy these beautiful pieces created by the
community below!

How to Create a 3D Paper Cut-Out Text Effect in Adobe InDesign

So quick and easy! Arjen van der Velde perfected this 3D Paper Cut-Out Text Effect from . You should try it out too!

How to Create a 3D Paper Cut-Out Text Effect in Adobe InDesign

Cartoon Fundamentals: The Secrets in Drawing Animals

Congrats, you did great! Ashley Miller did a wonderful job drawing different sides of this cat from this Cartoon Fundamentals lesson by Check it out!

Cartoon Fundamentals The Secrets in Drawing Animals

How to Create a Vintage Music Festival Flyer in Adobe InDesign

Inspired by this summery Vintage Music Festival Flyer by , Jael mastered her own result. Check it out below!

How to Create a Vintage Music Festival Flyer in Adobe InDesign

How to Be Involved in the Next Showcase

Have
you created a piece based on one of our tutorials here in the Design
& Illustration section of Envato Tuts+? We’re keen for you to share
your results with us! Check out the general guidelines below to join in
with our community:

  • Your artwork should be similar in some
    way to the tutorial that you followed or that inspired it. The aim of
    these showcases is to share what readers have created after following
    the tutorial.
  • Comment on the tutorial you used, attaching an
    image of your result. We’re keen on all levels of ability: from beginner
    to advanced!
  • Include a comment about your result, yourself, or your process. We like knowing about you and what you’re sharing.
  • Share
    the tutorial when you share that artwork elsewhere on the web. If
    you’ve posted your piece on sites like Facebook, Tumblr or Behance, link
    back to the tutorial so that other users know your source and can join
    in on the fun.

Thanks to everyone who was highlighted above for sharing your results with the Envato Tuts+ community. We look forward
to checking out your brilliant versions of our tutorials in the near
future, and welcome users new and old to participate in upcoming
showcases.

20 Best Photo to Pencil Drawing Effect Actions for Photoshop

Post pobrano z: 20 Best Photo to Pencil Drawing Effect Actions for Photoshop

Learn how to make photo drawing effects using Photoshop actions! Check out this awesome resource list below.

20 Best Photo to Sketch & Art Photoshop Actions

How do you draw a person? A city? Or sky? These simple questions open the floodgates to different design and art theories, but often people get intimidated by them.

That’s why you should always take advantage of different mediums to explore your creative thoughts. Photoshop actions can deliver promising, expert-level results by transforming any photo into a realistic pencil drawing.

Explore varying textures and more, with exciting actions perfect for any art enthusiast. Enjoy this selection of amazing handpicked assets from Envato Market and Envato Elements.

Want to see these resources in action? Check out our examples below.

Make Amazing Photo Effects Fast: See Our Examples!

To give you an idea of how easy it is to use these resources, here are two fun examples we’ve tried out!

Pencil Sketch Photoshop Action

First, I tried out this pencil sketch action. It quickly changes your photos to pencil drawings and works with all the latest versions of Adobe Photoshop. For the best results, use it with high-resolution photos between 1,500 and 6,000 pixels in size.

Pencil Sketch Photoshop Action

Here I tried this action on this Student Stock from Pixabay. All I needed to do was open the photo and press play. Pretty simple setup! Check out the result below.

Pencil example 1

Sketch Art Photoshop Action

For a little more texture, I went with this pretty Sketch Art action for Adobe Photoshop. Easily make your photos into gifts, packages, or souvenirs with this quick and effective action.

Sketch Art Potoshop Action

Here I used this action on this Man Stock from Pixabay. Initially, I
created a simple color fill around the man’s entire body before pressing
play. It’s a pretty big file, so give it some time to load. Check out my result below.

Pencil Example 2

Want to see more options? Check out the rest of these amazing resources below.

Mixed Ink Sketch Photoshop Action

Use Photoshop actions to help update your space! This mixed ink sketch action combines ink and pencil textures for an abstract, modern painting. It’s been tested on dozens of photos with quality results and creates stunning images you’ll want to hang up. Try it out!

Mixed Ink Sketch Photoshop Action

Sketch Photoshop Action

Dedicate a special portrait to your furry friend with this amazing action. This download features one Photoshop action with accompanying brush textures to complete the look! It’s been tested on Photoshop CS3 and above, so make sure to try it out with recent versions!

Sketch Photoshop Action

Pencil Sketch Photoshop Action

Discover the beauty of hatching and crosshatching pencil marks with this sketch Photoshop action. Convert any photo into a masterpiece with the two-step process. First, create a new layer dedicated to the pencil details, and then brush over your image. Press the action and presto! You’ve got one stunning traditional result.

Pencil Sketch Photoshop Action

Scribble Pen Sketch Photoshop Action

Some artists are so talented that they can create epic drawings with pens! Now you can too with this incredible Photoshop action. Dedicate a new layer to the areas where you want the most details, and then play the action. Within a matter of moments, you’ll get a cool drawing like the one below.

Scribble Pen Sketch Photoshop Action

Graphitum – Charcoal Sketch Photoshop Action

Charcoal is another great medium many artists enjoy. Now you can explore these dramatic tones with this fun Graphitum Photoshop action. Included in this pack is one main Photoshop action with access to 10 colorful presets for more options. Check it out!

Graphitum - Charcoal Sketch Photoshop Action

Pencil Sketch vs Camera Photo Effect Photoshop Action

Easily change your cityscapes into dramatic pencil sketches with this Photoshop action. This action simulates a person holding a torn drawing over a real-life scene. Inspired by the photo artist Ben Heine, this action creates a high-quality image we’re sure you’ll love.

 Pencil Sketch vs Camera Photo Effect Photoshop Action

Tech Sketch Photoshop Action

Design the tech you’ve always wanted with this brilliant Photoshop action. Try it out on amazing car concepts and more for fantastic tech-inspired drawings. Save countless hours with this simple action packed with well-organized layers.

Tech Sketch Photoshop Action

Pencilogy – Pencil Sketch Photoshop Action

Prefer a colored sketch instead? Then try out this clever Pencilogy Photoshop action. Get fast results with easy-to-use folders you can turn off and on to adjust your drawings. Enjoy the classic black-and-white effect or switch it up with full-blown color.

Pencilogy - Pencil Sketch Photoshop Action

Pencil Sketch Photoshop Action

No matter your subject, Photoshop actions create jaw-dropping images that will wow your audience. And this pencil sketch action is no different. Create realistic pencil sketches that you can easily apply color effects to. Keep it monochromatic for a traditional look or just add color.

Pencil Sketch Photoshop Action

Art Pen Photoshop Action

Make your photography even more beautiful with this art pen Photoshop action. Designed to combine two traditional textures into one, this action is highly effective. Play around with different looks by jumping into the folders section and experimenting with texture. Check it out!

Art Pen Photoshop Action

Pencil Print Photoshop Action

Design epic prints with traditional pencil textures. This new Photoshop action brings you phenomenal results with simple instructions. As with most actions, you’ll need to follow the initial steps of preparing your photo before playing the action. Pair this design with posters, prints, and more.

Pencil Print Photoshop Action

Architectum – Sketch Draft Photoshop Action

Need a new way to display your product photos? Try this wicked sketch Photoshop action. Featuring a fantastic, realistic look, this action creates drawings that look as if they just left your drafting table. Simply pick the photo you want, and then play the action for great effects!

Architectum - Sketch Draft Photoshop Action

Architectum 2 – Sketch Tools Photoshop Action

A sequel to the original Architectum action, this action is one you don’t want to miss! Add varying straight and diagonal lines for more dynamic energy in your work. Apply this action to objects, places, or transportation like the image below. Check it out!

Architectum 2 - Sketch Tools Photoshop Action

Construct Photoshop Action

Construct a clean and dynamic composition with this helpful Photoshop action. Specifically made for design images and architecture-friendly content, this action is super simple to master. Try out the colored pencil effect by itself or add more color to match your brand.

Construct Photoshop Action

Archi Sketch Photoshop Action

Architects are known for bringing their work to life with traditional pencil sketches. Now you can get the same look with your favorite architectural imagery. Perfect for exteriors, interiors, and other types of building design, this action is highly effective and easy to use.

Archi Sketch Photoshop Action

Pen Sketch Photoshop Action

Get clean crosshatching lines with this incredible pen sketch action. Optimized specifically for Photoshop CS3 and above, this action helps you enjoy a phenomenal pen sketch look without all the fuss. Use it on posters, collages, and more for different effects.

Pen Sketch Photoshop Action

ModernArt Photoshop Action

Highlight your family photos with this charming and modern Photoshop action. This ModernArt action comes with one Photoshop action to quickly convert your work. Save the original background or upload your own textures for more variety. Try it out!

ModernArt Photoshop Action

Vintage Sketch 2 Photoshop Action

Mix and match vintage styles and textures with beautiful color presets. This amazing Photoshop action is inspired by vintage drawings and even places your photo on weathered paper. Customize your result by playing with different brushes to make your work unique.

Vintage Sketch 2 Photoshop Action

Show Us Your Sketch Effects!

Tried any of these assets? Let us know! Tell us your favorite Photoshop sketch effects in the comments below.

Or make your own! Create amazing photo to sketch effects using the following tutorials:

This has been a collection of premium resources perfect for the avid designer and photographer. For more cool Photoshop sketch actions, check out Envato Market and Envato Elements, or enlist the help of our talented professionals at Envato Studio. Happy designing!

The Move to the Cloud is a Good Thing – But Some Caution is Advised

Post pobrano z: The Move to the Cloud is a Good Thing – But Some Caution is Advised

Over the past few years, the creative world has undergone a mass migration to the cloud, which has been spearheaded by companies like Adobe. The Californian computer software giants are now promoting their cloud-based services over desktop-based apps, and there are many benefits to using these online tools. This is a step in the right direction for the industry, as it is important to use the most up-to-date technology available. However, whenever anything is open to the public, there is always a risk. For that reason, some caution is advised for people who use cloud-based services.

The Creative Cloud from Adobe gives users the entire collection of Adobe Desktop and mobile apps all in one place. These can be used for graphic design, photography, web and UX design, animation and film editing, and communication and social. Having everything in the same place is a sign of the times, as the long-standing app craze appears to be fading. Now, with the advent of HTML5 for websites, there is no longer any need for companies to have separate apps for different things. Adobe has taken this idea and provided a platform that has everything creative-minded people need to thrive and develop their ideas.

According to Steven Warner, the vice president of digital video and audio at Adobe, “the demands and pace of video content creation are reaching levels we have never seen before. The time pressure on video professionals means the need for powerful and efficient creative tools has never been greater.” For this reason, Adobe have aimed to provide content creators with all the tools they need to produce high-quality videos and graphics in a shorter space of time.

The benefits of working with this new software are clear but there may also be some shortcomings, such as security concerns. When working on the cloud, users need to be aware that their information could be targeted by cybercriminals. For people and businesses working online, cloud security is imperative. It ensures that there are secure databases in the cloud, it safeguards applications, and it also supports hybrid deployments. The 2018 hack of Tesla’s Amazon Web Services account highlights the need for safeguarding when working on the cloud. In the breach, cybercriminals used the account to mine cryptocurrency and also exposed some of Tesla’s proprietary data.

Adobe is now looking to expand its reach and get budding young creators familiar with their services from a young age. The company now offers schools Creative Cloud licenses for $5 per year, in a move which could revolutionize interactivity within the classroom. This is set to attract even more users to the Adobe product and strengthen its hold on the industry.

In the fast-paced world of design and content creation, those in the industry must keep up-to-date with technological developments and move with the times. There are numerous benefits to using the cloud now, and, in time, it seems that everything will be done using services like the one from Adobe. Those using the cloud must remember to put proper security protocols in place though, as cyber-attacks are becoming more and more prevalent.

Featured image by Joshua Earle

Crutches reinvented

Post pobrano z: Crutches reinvented

Some products seem to have been designed the same way forever. Take crutches for example, it seems that one guy buit it one way and everybody thought it couldn’t be improved and kept producing new crutches with the same designs over and over. Of course, there were some minor formal changes in terms of design, but the functionalities didn’t evolve much.

The people at Mobility Designed didn’t take crutch-assisted mobility for granted and decided to give it their own twist. The results are stunning, the M+D crutches allow for better mobility, hands-free usage, and other cool features that you can see in the video above.

5 Reasons Why You Should Launch a Print-on-Demand T-Shirt Business

Post pobrano z: 5 Reasons Why You Should Launch a Print-on-Demand T-Shirt Business

Have you ever dreamed of starting your own business?

You might think that it’s out of your reach, but it is not, because with 21st century technologies pretty much anyone can start a business.

Selling print-on-demand t-shirts is one of the easiest ways to get started with dropshipping. Here are 5 reasons why you should do it…

Photo by rawpixel on Unsplash

What is print-on-demand?

Dropshipping is a business model where the seller runs the store and markets and sells the products while the manufacturer produces and stores said products and ships them to customers.

Print-on-demand is a form of dropshipping that allows you to create a unique design, print it on products (it can be anything from t-shirts to mugs), and sell those products to the customers through your online store.

T-shirt are the most popular print-on-demand item. After all, everyone needs them, and people love wearing apparel with cool designs! You can sell print on demand t-shirts with Printify.

Why should you launch your print-on-demand t-shirt business?

Okay, so now that you know what print-on-demand business is, the question is why should you start one?

  • Low-risk. There’s pretty much no risk involved in dropshipping because the product only gets made when the customer has paid for it. You only pay the fulfillment company a percentage from each product that you actually sell.
  • Low-investment. You only need a little bit of money to get started with print-on-demand t-shirts. You will have to pay for a domain name, for a Shopify account, and for Facebook ads, but that’s pretty much it (unless, of course, you are not artistically inclined and can’t create the designs yourself, because then you’ll also have to pay for design). You can get started with less than $100!
  • Work from anywhere. All you need to run a print-on-demand t-shirt business is a computer and an Internet connection. Yes, this means that you can work from home, but that’s not all! “Home” can be anywhere. Buenos Aires, Paris, Tokyo… You can travel the world while making money!

Photo by Kevin Schmid on Unsplash

  • Set your own hours. Do you know that the standard 9-5 workday was meant for factory workers doing mindless repetitive work? It simply doesn’t work well for people who are in cognitively demanding occupations. Some of us produce our best work early in the morning, meanwhile some of us produce our best work late at night, so how does it make sense for everyone to work the same hours? It doesn’t! However, running your own business allows you to set your own schedule, and be much productive!
  • Make decent money! Yes, jobs might be less risky than running a business (although even that is highly questionable in the current economy), but they also have a salary ceiling that you won’t be able to surpass no matter what you do. Meanwhile, when you run your own business, you don’t have this problem, because you can grow your revenue as much as you want. Moreover, you can also sell your business for 20x-30x the monthly revenue, which is a lot of money. Can you imagine a life where you don’t have to worry about money anymore? Well, if you can manage to build a successful busines, it could become your reality!

So let’s recap. A print-on-demand t-shirt business is low-risk, low-investment opportunity that, if everything works out, could provide you with a life where you can travel the world, work wherever and whenever you want, and make a lot of money. The question is… What are you waiting for?

Photo by Lost Co on Unsplash

Conclusion

It’s great that you are excited about print-on-demand t-shirts, but keep in mind that this excitement will fade, and there will be times when you will want to quit. After all, it takes a lot of hard work to get a business off the ground, and you probably won’t be able to replace the income from your job in less than a year. Can you persevere for that long?

Are you okay with your 9-5 office job, 4 weeks vacation every year, and your current salary? If so, then there’s probably not much point launching your own business, because if you don’t want it badly enough you are not going to last.

However, if you are sick and tired of your current situation, then by all means, commit to entrepreneurship. No one can change your life but you!

Creating your own meme generator

Post pobrano z: Creating your own meme generator

Almost every time a new meme pops up in my Twitter feed, I think of a witty version to create. I’m not alone in this. Memes are often a way to acknowledge a shared experience or idea. In a variation of the „Is this a pigeon” meme that has been making the rounds online, a designer Daryl Ginn joked about the elementary nature of most applications that say they use artificial intelligence.

pic.twitter.com/nAHki0YFyV

— Daryl Ginn (@darylginn) May 16, 2018

Several people replied to his tweet saying something along the lines of „replace this with this.” Daryl’s version got them thinking about other possible variations. Platforms like imgFlip exist to make meme generations fast and easy. However, there is only so much customization they can allow. For many memes, creating new versions can only be done by people with Photoshop knowledge. But it doesn’t have to be so! For some memes that require more than Impact for the font text on an image, a meme generator can be created using the HTML Canvas API. In this tutorial, we’re going to make a generator for the #saltbae meme.

But first…

Let’s look at some fun interactive meme examples!

The website pablo.life allows you to create your own Kanye West TLOP album cover by changing the text and image.

This is one of my favorites:

The digital agency R/GA created the Straight Outta Somewhere campaign where users „show the world where they’re from by uploading their own photo and filling in the blank after 'Straight Outta ____.'” Users can download and share the meme.

Developer Isaac Hepworth created the Trump Executive Order Generator.

Spotify collaborated with Migos to create a range of downloadable Valentine’s Day cards that can be customized by changing names.

Let’s build our own meme generator!

Now, the tutorial. In a popular version of the #saltbae meme, instead of salt, Salt Bae (whose name is Nusret Gökçe) sprinkles something other than salt.

Loading an image

The first thing we have to do is load the original image onto the canvas. You can load an image one of two ways: from a URL or from one that exists in the DOM using the <img> tag but is hidden.

Here’s how we do it with a hidden image tag:

<canvas id="canvas" width="1024" height="1024">
  Canvas requires a browser that supports HTML5.
</canvas>
<img crossOrigin="Anonymous" id="salt-bae" src="http://res.cloudinary.com/dlwnmz6lr/image/upload/v1520011253/170203-salt-bae-mn-1530_060e5898cdcf7b58f97126d3cfbfdf71.nbcnews-ux-2880-1000_kllh1d.jpg"/>

I’m hosting the image on Cloudinary and added the crossOrigin attribute so we don’t run into any CORS issues.

function drawImage(text) {
  const canvas = document.getElementById('canvas');
  const ctx = canvas.getContext('2d');
  ctx.clearRect(0, 0, canvas.width, canvas.height);
  const img = document.getElementById('salt-bae');  
  ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
}

window.onload = function() {
  drawImage();
}

We’re using the canvas drawImage function to draw the image to the canvas. It can be used to draw videos or parts of an image as well. The method provides different ways to do this. We’re drawing the image by indicating the position and the width and height of the image.

ctx.drawImage(img, x, y, width, height);

Alternatively, we could load the image from a URL:

function loadAndDrawImage(src) {
  // Create an image object. (Not part of the dom)
  const image = new Image();
  
  // After the image has loaded, draw it to the canvas
  image.onload = () => { 
    // draw image 
  };

  // Then set the source of the image that we want to load
  image.src = src;
}

Now we load in an image to replace the sprinkles Salt Bae is throwing. First, we load the image using one of the techniques I mentioned earlier, then we draw it to the screen like we did with the Salt Bae base image.

function getRandomInt(min, max) {
  min = Math.ceil(min);
  max = Math.floor(max);
  return Math.floor(Math.random() * (max - min)) + min; //The maximum is exclusive and the minimum is inclusive
}

function drawBackgroundImage(canvas, ctx) {
  ctx.clearRect(0, 0, canvas.width, canvas.height);
  const img = document.getElementById('salt-bae');  
  ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
}

function getRandomImageSize(min, max, width, height) {
  const ratio = width / height;  // Used for aspect ratio
  width = getRandomInt(min, max);
  height = width / ratio;  
  return { width, height };
}

function drawSalt(src, canvas, ctx) {
  // Create an image object. (Not part of the dom)
  const image = new Image();
  image.src = src;
  
  // After the image has loaded, draw it to the canvas
   image.onload = function() {
    for (let i = 0; i < 8; i++) {
      const randomX = getRandomInt(10, canvas.width/2);
      const randomY = getRandomInt(canvas.height-300, canvas.height);
      const dimensions = getRandomImageSize(20, 100, image.width, image.height);
      ctx.drawImage(image, randomX, randomY, dimensions.width, dimensions.height);
    }
  }
  return image;
}

onload = function() {
  const canvas = document.getElementById('canvas');
  const ctx = canvas.getContext('2d');
  drawBackgroundImage(canvas, ctx);
  const saltImage = drawSalt('http://res.cloudinary.com/dlwnmz6lr/image/upload/v1526005050/chadwick-boseman-inspired-workout-program-wide_phczey.webp', canvas, ctx);
};

Now we can let users sprinkle something other than sprinkles.

Uploading an image

We’re going to add a button that triggers an image upload and includes an event listener to listen for a change.

<input type="file" class="upload-image">`
function updateImage(file, img){
  img.src = URL.createObjectURL(file);
}

onload = function() {
  const canvas = document.getElementById('canvas');
  const ctx = canvas.getContext('2d');
  drawBackgroundImage(canvas, ctx);
  const saltImage = drawSalt('http://res.cloudinary.com/dlwnmz6lr/image/upload/v1526005050/chadwick-boseman-inspired-workout-program-wide_phczey.webp', canvas, ctx);
  const input = document.querySelector("input[type='file']");
  /*
   * Add event listener to the input to listen for changes to its selected
   * value, i.e when files are selected 
   */
  input.addEventListener('change', function() {
    drawBackgroundImage(canvas, ctx); // clear canvas and re-draw
    updateImage(this.files[0], saltImage);
  });
};

URL.createObjectURL() creates a DOMString containing a URL representing the object given in the parameter which, in this case, is the uploaded file.

We can even up the game a little bit, like providing some default options. I’ve added a few emojis you can play around with as a starting point.

Downloading the final image

Once the new meme has been generated, we want users to be able to download and share it. The typical way of doing this is by opening the canvas in a new tab using the toDataURL method but the user would have to right click to save the image from that tab and that’s not very convenient.

So, instead, we can take advantage of the download attribute added to links in HTML5. We create a link that, on click, sets the download attribute to the result of canvas.toDataURL. The toDataURL() method „returns a data URI containing a representation of the image in the format specified.”

function addLink() {
  var link = document.createElement('a');
  link.innerHTML = 'Download!';
  link.addEventListener('click', function(e) {
    link.href = canvas.toDataURL();
    link.download = "salt-bae.png";
  }, false);
  link.className = "instruction";
  document.querySelectorAll('section')[1].appendChild(link);
}

Well that’s it! Our meme generator is done.

Some cool links

  • Darius Kazemi has been making a bunch of twitter bots that generate memes.
  • Vox Media has a meme generator called meme that’s open source.

Meme away!

The post Creating your own meme generator appeared first on CSS-Tricks.

More Unicode Patterns

Post pobrano z: More Unicode Patterns

Creating is the most intense excitement one can come to know.

Anni Albers, On Designing

I recently wrote a post — that was shared here on CSS-Tricks — where I looked at ways to use Unicode characters to create interesting (and random) patterns. Since then, I’ve continued to seek new characters to build new patterns. I even borrowed a book about Unicode from a local library.

(That’s a really thick book, by the way.)

It’s all up to your imagination to see the possible patterns a Unicode character can make. Although not all characters are good as patterns, the process is a good exercise for me.

And, aside from Unicode itself, the methods to build the patterns may not be so obvious. It usually takes a lot of inspiration and trial and error to come up with new ones.

More tiling

There are actually many ways to do tiling. Here’s one of my favorite tile patterns, which can be easily achieved using CSS grid:

A series of squares that vary in size from small to large and are arranged in a masonry pattern.
.grid {
  /* using `dense` to fill gaps automatically. */
  grid-auto-flow: dense;
}

.cell {
  /* using `span` to change cell size */
  grid-column-end: span <num>;
  grid-row-end: span <num>;
}

Grid Invaders by Miriam Suzanne is a good example of this technique.

Now, what I’m trying to do is put some Unicode characters into this grid. And most importantly, update the font-size value according to the span of its cell.

A series of red and orange Chinese Unicode characters arranged in the grid pattern of the previous image.
Pattern using characters \2f3c through \2f9f

I only tested with Chrome on Mac. Some of the examples may look awful on other browsers/platforms.

.cell {
  /* ... */
  --n: <random-span>;
  grid-column-end: span var(--n);
  grid-row-end: span var(--n);
}

.cell:after {
  /* ... */
  font-size: calc(var(--n) * 2vmin);
}

It’s a bit like the Tag Cloud effect, but with CSS. Lots of patterns can be made this way.

A series of orange and red \2686 and \2689 Unicode characters arranged in the same grid pattern as the other examples.
Pattern using characters \2686 through \2689
Unicode characters \21b0, \21b1, \21b2 and \21b4 arranged in the same grid pattern as the other examples. The effect is like a series of arrows pointed in different directions.
Pattern using charaters \21b0, \21b1, \21b2 and \21b4

The span of the columns and rows don’t always have to be the same value. We can make small modifications by changing how many rows each cell spans:

The grid layout with taller columns now that each cell spans more rows.
.cell {
  /* only change the row span */
  grid-row-end: span <num>;
}

Since the font-size property scales up/down in both directions (vertically and horizontally), the scaleY() in the transform property will be used instead.

Red and blue diamond-shaped Unicode characters squeezed into the taller, thinner columns of the grid layout.
Pattern using characters \25c6 through \25c8
:after {
  /* ... */
  transform: scaleY(calc(var(--span) * 1.4));
}

And here’s another one, made by rotating the inner container of the grid to some degree.

Red and blue triangles pointed diagonally in the grid layout.

The triangles also can be drawn with clip-path and will be more responsive, but it’s nice to do something in a different way.

More modifications to the layout:

The grid layout with skewed cells so that they form repeating parallelograms instead of rectangles.
.column-odd {
  transform: skewY(40deg);
}

.column-even {
  transform: skewY(-40deg);
}

Now follow these transformations for each column.

Plus sign Unicode characters in green, red, yellow and gray that follow the parallelogram pattern of the updated grid, forming a crochet-like effect.
Pattern using characters \1690 through \1694

Composition

Many Unicode pairs share some kind of shape with different angles. For example, parentheses, brackets, and arrows with different that go in different directions. We can use this concept to combine the shapes and generate repeatable patterns.

This pattern uses less-than and greater-than signs for the base:

Wavy pattern using <code><</code> and <code>></code>
:nth-child(odd):after {
  content: '<';
}

:nth-child(even):after {
  content: '>';
}

Here we go with parentheses:

A wavy pattern using ( and )
:nth-child(odd):after {
  content: '(';
}

:nth-child(even):after {
  content: ')';
}

These are characters we use everyday. However, they give us a fresh look and feeling when they are arranged in a new way.

There’s another pair of characters, , and . Placing them in the grid and scaling to a proper value connect them together into a seamless pattern:

It’s like weaving with characters! We can even take it up a notch by rotating things:

Pattern using \169b and \169c

Rings

Last week, I joined a CodePen Challenge that challenged the group to make a design out of the sub and sup elements. As I experimented with them, I noticed that the two tags scaled down automatically when nested.

So, I tried to put them around a circle:

.first-level {
  /* Slice the circle into many segments. */
  transform: rotate(
    calc(360deg / var(--slice) * var(--n))
  );
}

Suddenly, I realized this method can be used to generate background patterns, too. The results are pretty nice.

The Unicode characters for less-than and greater-than signs repeated in a circle that starts large around the edge and narrows in, like the characters are flushing down a drain.
Pattern using \003e
sub:after, sup:after {
  content: '\003e';
}

The interesting thing is that changing a single character can end up with very different results.

Adding the Unicode character \002e creates the same circular pattern, but with arrows and dots.
Combining \002e and \003e together to form a pattern
Combining \25c9 and \2234 creates a different effect in the same circular layout

Wrapping up

That’s all for now! The color palettes used in this article are from Color Hunt and Coolors.co.

The examples are generated with css-doodle, except for Ring examples in the last section. Everything here can be found in this CodePen collection.

Hope you like them and thanks for reading!

The post More Unicode Patterns appeared first on CSS-Tricks.