PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, October 10, 2022

[FIXED] How can I speed up gd imagepng

 October 10, 2022     gd, php     No comments   

Issue

I am using gd library to generate images. The process is slow, so when I open the image during the saving process I get blank screen. How can I avoid that?

It takes ~0.4 sec to save the image, if you refresh the image in that time you will get blank screen.

The script is slow it takes 6 sec to generate image, during which you will see the old image.


Solution

To avoid "blank screen" caused by the saving process, you can save an image as a new file (for example hi_finished.png) and after saving, rename it as hi.png.



Answered By - hsz
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing