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

  • Home
  • SEARCH
  • 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 8401095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:43:05+00:00 2026-06-09T21:43:05+00:00

I am accessing an image from a folder in localhost. Image loads correctly in

  • 0

I am accessing an image from a folder in localhost.

Image loads correctly in img tag. But, when I try to draw that image onto canvas, it doesn’t appear!

I have implemented it such that when image is dropped onto the canvas, it is drawn onto it and I draw it by getting the image from original source. When I drag again and again, then, after some attempts, it appears.

The functionality is working perfectly in Firefox and I.E.

This is the source of my image on localhost:

b.src = "http://localhost/casema...E/2780Chrysanthemum.jpg"

ctx1.drawImage(b, x2-15*z, y2-15*z, w1, h1 );
  • 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-06-09T21:43:07+00:00Added an answer on June 9, 2026 at 9:43 pm

    In HTML5, it not for sure that an image will always load immediately, so you
    need to make sure that the image has fully loaded beford you draw it. this code may help you :

    var myImage = new Image();
    myImage.src = "path/to/your/image";
    myImage.onload = function(){
          //context is the canvas context 
          context.drawImage(myImage,x,y,weight,height);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking forward the method for accessing the current image's Uri from an ImageView,
We are accessing a .NET object from matlab. It's some image capture software, and
I've got the following function in webnoir that serves up an image from disk.
Just very plain and straight. I created new folder named images apart from img
When accessing member that doesn't exist, automatically creates the object. $obj = new ClassName();
am accessing a class from my webservice as [WebMethod(EnableSession = true)] public string fetchAbsentees(string
I'm having trouble accessing my IIS 7.5 express site in FireFox but i can
I am currently working with Stripes and I have an ActionBean that loads a
I have have a problem loading and accessing data from a value object in
We've having trouble deploying a web service that works in our development environment, but

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.