Git Product home page Git Product logo

Comments (2)

Skrol29 avatar Skrol29 commented on June 4, 2024

Hi,

It could be done, but it would be a kind of bad practice because the picture binary contents would be stored into the PHP memory until the final merging is done. That could be heavy when you have a big picture or several pictures.

In another hand, when files to be replaced or inserted in the template are designed by a path, then it is done on the fly (one by one) during the final merging.

And also, doing a temp file is very fast with PHP :

$temp_pic_ress = tmpfile();
fwrite($temp_pic_ress, $binary_contents);
$temp_pic_path = stream_get_meta_data($temp_pic_ress)['uri'];

from opentbs.

rotdrop avatar rotdrop commented on June 4, 2024

Actually, I cannot quite follow you concerning the "bad practice", although I agree that it is only useful for comparatively small images, like a logo in the header of a letter, or the copy of a signature. It is clear that this can be handled with a temp-file, OTOH, OpenTBS then just reads the file into memory anyway (looking at _DatPrepare())?

I think I can come up with a pull request (here it is: #20)

from opentbs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.