Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7667303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:04:05+00:00 2026-05-31T15:04:05+00:00

Is there a way to cut image into tiles using Javascript in web browser?

  • 0

Is there a way to cut image into tiles using Javascript in web browser?

I would like to let user pick one image from the gallery on a web page and then cut that picture in 4 or 6 new tiles, then put those tiles in a table and let the user add some description for each of them.

As I see it now, I could reload tiles from the server after user selects image and number of tiles, but I would like to skip reloading if possible.

Edit:
Regarding KP’s comment on browser level support, I would like to have solution that does not require HTML5 support, if that is possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:04:07+00:00Added an answer on May 31, 2026 at 3:04 pm

    If you are dealing with modern browsers, you could do it with canvas. See this tutorial and look at the “Slicing” section. Basically you can use

    drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight)

    do chop the original image any way you like it (the s based arguments), and place that section anywhere you want (the d based arguments) in the canvas. If you then want to save a slice, you can use the toDataUrl method to get the base64 of the slice. See this.

    Keep in mind that the image src url needs to be on the domain the javascript was loaded from, else you’ll taint the canvas. You can get around that by having the server return a base64 representation of the image.

    Finally, toDataUrl on large images can be “slow”, so be ready for that.

    EDIT — since you can’t rely on canvas, you’d need to use SVG, which being older is supported by more browsers. There are libraries like Raphael.js to help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to cut down a specific functions of ActiveSync service on
is there way how to get name ov event from Lambda expression like with
Is there way that I can read the file from remote server using fopen
Is there a way to return a random row from a table using LINQToSQL?
I have an image that is 480 pixels by 40 pixels. I would like
EDIT: to cut this short: is there a way to call $kernel->getRootDir(); from within
Are there any documents/tutorials on how to clip or cut a large image so
I would like to resize (downscale) some images the way that Facebook does it.
Is there way to better identify design pattern in source codes, esp. if you
Is there way to mute an audio stream or at least control the volume?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.