IMG resize advice wanted

jameshale james at thehales.id.au
Sun Mar 27 22:11:35 EDT 2016


I current;y have an app for indexing ans searching ePub files. The focus of
the app being the ability to apply complex searches against the text of the
ePub.
That being said some ePubs have embedded images which my app can display in
situ.
At this time the on;y change I make is to ensure the image sits by itself
(i.e. There is Aline breaker both before and after the image.)
However images can be large.
Their height is of no real concern but their width is.
If their width is greater than the width of the field displaying the text
they are embedded within I need to allow horizontal scrolling. The image
could also end up being displayed in multiple text panes, something I really
want to avoid.
There has been some recent discussion about resizing images and so I thought
it was time to tackle this in my app.
When I read in an ePub I extract all resources and put the text into a
SQLite dub and the images into a separate folder.
My question is this.
What would make more sense, resize the actual image files to fit into the
desired text field without requiring scrolling or read in the existing files
and resize on the fly within LC.
The advantage of the first is that it only needs to be done once (unless the
user is constantly resizing the app).
The disadvantage is that the original image is lost. 
The advantage of the second is that nothing happens to the original image.
The disadvantage is that all the   links within the text would require
rewriting and each image would require processing each time it was needed.
After writing the above the first option looks better.

Anyway, can anyone give me a hint as to how to use LC to read in an image,
resize it and then write it out again?



--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/IMG-resize-advice-wanted-tp4702682.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list