ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike <mz4whee...@gmail.com>
Subject Re: data import - product images
Date Thu, 25 Jan 2018 16:26:01 GMT
A well written perl or shell script can take "original.jpg" in directory
"x" and create, multiple larger/smaller images with the same "root" name.
You can use image magic, an image processor package, to do this.  Basic
stuff for anyone who knows shell scripting.

You can then import these images using a single XML data_reader file, and
import it into OFB.  Example:

<?xml version="1.0" encoding="UTF-8"?>

[plus 1000s more].....


A single script can generate the above XML file (with 1000s of products),
resize 1000s of "original.jpg" into multiple images, and import into OFB,
all in one pass.  Standard stuff for anyone competent with perl/shell

What you don't want is make java do busy, CPU intensive work and have it
render different sizes "on the fly", if that is what you are suggesting.

On Wed, Jan 24, 2018 at 11:56 PM, Jesse Thomas <jesse@thomasnetworks.net>

> Thanks Shi and Rishi for the responses.
> I was hoping to do this the hard way and l learn some new tricks in the
> process. More specifically I was hoping to use a ftl template (like in
> ./specialpurpose/ecommerce/data/DemoTree.xml) to call a service or
> function directly. Making the solution 100% OFB.
> If you know of any examples or clues please let me know.
> Thanks again!
> On 1/24/2018 11:27 PM, Shi Jinghai wrote:
>> On generating the other sizes needed, it's already in the source code, see
>> https://github.com/apache/ofbiz-framework/blob/trunk/applica
>> tions/product/src/main/java/org/apache/ofbiz/product/image
>> /ScaleImage.java
>> -----邮件原件-----
>> 发件人: Jesse Thomas [mailto:jesse@thomasnetworks.net]
>> 发送时间: 2018年1月24日 15:30
>> 收件人: user@ofbiz.apache.org
>> 主题: data import - product images
>> Is there is a way of using a data reader to load a product image and have
>> it treated as though its uploaded as an "Original Image"
>> (generating the other sizes needed)? Or whats the best way to load images
>> during data migration?
>> The images are available in the file system and via http, several
>> thousand of them. Thanks in advance for any help or advice!
>> Thanks,
>>       Jesse

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message