Jump to content

Manipulating an image in memory without saving it


lpa
 Share

Recommended Posts

We need to create a preview of a page with data retrived through an external api without saving the page. The page consists of text, images and embeded HTML-items (youtube video, twitter feed-item etc). The preview is never saved as a page as it is only for preview purposes. 

Is it possible to create a new PageImage object in the memory, do cropping and resizing and show the new manipulated image on the preview page purely in memory? 

Link to comment
Share on other sites

Counter question... are you sure it's a good idea to do that in memory for every request? Wouldn't it be better to do it once, save the result and then just return the results from the saved page rather than recreating it on every request?

Link to comment
Share on other sites

This is a journal site where the content of articles is edited in an editorial system. The writer wants to see the preview of the article during the editing phase. The article is saved to the site only when it is ready to be published. We don't want the article to be saved before it is ready to be published. 

Link to comment
Share on other sites

  • 3 weeks later...
On 2/16/2022 at 6:32 PM, lpa said:

The article is saved to the site only when it is ready to be published.

Where do you store the article during the editing phase? I am assuming an article can be in this phase for more than a day.

Link to comment
Share on other sites

  • 2 weeks later...
On 3/8/2022 at 8:25 AM, kongondo said:

Where do you store the article during the editing phase? I am assuming an article can be in this phase for more than a day.

The articles are edited in an editorial system and we only want to preview them before they are finally ready to be published. Bernhards advice on using Nette was the chosen solution for us. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...