TYPO3: Images are rendered with unwanted Outline/Border - image

In one case i am rendering all images from all news entries from one specific category inside an unordered list. Each image is wrapped inside an anchor element which itself is wrapped inside a list-item. Each image is 100% white and shall be displayed transparent.
After solving a few transparency related issues i now stand before the problem that ALL images are given an outline which i am not aiming for - since in some cases it might clash with the background (the background Image is changing sometimes). Either i have something missing in my code or something is wrong with the images i am trying to use.
Here is the typoscript code used for rendering the images:
myMarker.20 < plugin.tt_news
myMarker.20
{
code >
code = LIST
templateFile = fileadmin/templates/ext/tt_news/myMarker_template.html
excludeAlreadyDisplayedNews = 0
limit = 6
categoryMode = 1
categorySelection = 5
catImageMode = 0
catTextMode = 1
listOrderBy = title asc
displayList
{
image >
image.stdWrap.cObject = IMAGE
image.stdWrap.cObject.linkWrap = |
image.stdWrap.cObject.linkWrap.insertData = 1
image.stdWrap.cObject.titleText.field = title
image.stdWrap.cObject.file = field:image
image.stdWrap.cObject.file = GIFBUILDER
image.stdWrap.cObject.file
{
format = png
XY = 130, 48
transparentBackground = 1
backColor = transparent
10 = IMAGE
10
{
offset = 0, 48-[10.h]/2
border = 0
file
{
import = uploads/pics/
import.data = field:image
import.listNum = 0
import.override.field = image
maxW = 130
maxH = 48
quality = 100
}
}
}
}
} # myMarker
Maybe someone has an idea? Thanks for reading/help in advance anyway :)

Solved by not using gifbuilder.

Related

How to change the color of the dot inside a radio button with Resource Hacker

I’m trying to modify the color of the dot inside a radio button with Resource Hacker. I managed to change the color of the circle/frame but not the dot inside. I looked everywhere online and found similar examples but doesn’t exactly suit me with my situation. I guess all I need is the right syntax format. I tried so many different code combinations to no avail since I’m a newbie in coding. I’d really appreciate if you could help me out. The exact code I’m fiddling is below. Many thanks in advance.
object ScanCandidateGrp: TRzRadioGroup
Left = 103
Top = 34
Width = 64
Height = 66
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
TextShadowColor = clActiveBorder
GroupStyle = gsCustom
ItemFrameColor = clRed << I managed to change the circle color with this
ItemHotTrack = True
ItemHighlightColor = clBlue
ItemHotTrackColor = clGreen
ItemIndex = 0
Items.Strings = (
'Bob'
'Alex'
'Sue')
ParentFont = False
StartXPos = 2
StartYPos = 0
TabOrder = 0
Transparent = True
VerticalSpacing = 5
OnClick = ScanCandidateGrpClick
end

Create Images with watermark in extbase

I have a Model that stores a FileReference. And now I want to create an Image with a Watermark in the Extbase Controller. Does anybody know where I have to look for? I only found solutions with typoscript.
I choosed the TypoScript way and it worked pretty well.
Fluid:
<f:cObject typoscriptObjectPath="lib.tx_myext.watermarkedImage" data="{imageUid:'{image.uid}',copyright:'{image.copyright}')}'}"/>
TypoScript:
lib.tx_myext.watermarkedImage = IMAGE
lib.tx_myext.watermarkedImage {
file = GIFBUILDER
file {
XY = [10.w],[10.h]
format = jpg
10 = IMAGE
10 {
file {
import.field = imageUid
treatIdAsReference = 1
width = 1162
height = 580c
}
}
20 = BOX
20 {
color = #FFFFFF
opacity = 70
dimensions = [10.w]-[30.w]-10,[10.h]-20,[30.w]+20,[30.h]+20
}
30 = TEXT
30 {
text.data = field:copyright
fontSize = 15
fontColor = #000000
fontFile = path/to/my/font.ttf
offset = [10.w]-[30.w]-5,[10.h]-5
}
}
}
The result is an image with a white box and the copyright text on it at the right bottom corner.
I think the easiest way will be to use a typoscript solution. This must not be as pure typoscript, but the datastructure of the typoscript might be needed as parameter to the core functions of the GifBuilder class. TYPO3 7.6 API
The GifBuilder class is inherited from the class GraphicalFunctions which can be used also, as there are only a few additions and the main functionality is here.
The last problem are the examples in the net according this task: they are pibased and all of them end up in something like
$img = $this->cObj->IMAGE($typoScriptArray);
in modern (namespaced) notation using current API this would be:
$gifCreator = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\GifBuilder::class);
$gifCreator->init();
$theImage='';
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']) {
$gifCreator->start($fileArray, $typoScriptArray);
$theImage = $gifCreator->gifBuild();
}

Corona SDK (Lua) Sprite Sheet Animations

Im trying to get a sprite sheet to run through the 4 images so it plays an animation, although Corona SDK is giving me an error saying
"main.lua40: bad argument #2 to 'newImageSheet' (table (options)expected)
stack traceback: [C]: in function 'newImageSheet' main.lua 40: in main chunk"
exclamationMarkAnimations = graphics.newImageSheet("exclamationMarkAnimated.png", sheetOptions)
exclamationMarkAnimated =
{
width = 12,
height = 12,
numFrames = 4
}
animation = {
{
name = "bobbing",
start = 1,
count = 4,
time = 800,
loopCount = 0, -- "0" means always
loopDirection = "forward"
}
}
exclamationMarkVars = display.newSprite(exclamationMarkAnimations, exclamationMarkAnimated)
exclamationMarkVars:addEventListener("sprite", spriteListener)
Thank you for any and all help.
That project is saved under Corona samples as you can see in the picture below:
and also in this folder: C:\Program Files (x86)\Corona Labs\Corona SDK\Sample Code\Animation
You can use that as the base so save you some time.

How to make images saved locally actually appear on my screen?

Hello!
i'm trying to have my images appearing on a label by using this code
this is to save a random image from a particular URL
def photo_1():
urls = "https://www.flickr.com/photos/flickr/galleries/72157644537473411/" # You may change this into other websites!
regex = '<img src="([^"]+)".*>'
pattern = re.compile(regex)
photofile=urllib.urlopen(urls)
raw_data=photofile.read()
download=re.findall(pattern,raw_data)
randomdownload=random.choice(download)
urllib.urlretrieve(randomdownload, "1.gif")
global done_button2
done_button2 = Button(photo_window, text = 'Click here to display your chosen image on the black screen!', width = 53, command = generate_1)
done_button2.grid(row = 5, sticky = N)
done_button.config(state='disabled')
and this is to have the saved image appearing on a label but apparently not working so well ..
def generate_1():
img = ImageTk.PhotoImage(Image.open("1.gif"))
image_area = Label(photo_window, image = img, width = 55, height = 5).grid(row=2)
global done_button3
done_button3 = Button(photo_window, text = 'Click here to save the second random image locally! ', width = 53, command = photo_2)
done_button3.grid(row = 6, sticky = N)
done_button2.config(state='disabled')
this was a part of my code and when i run this application i made,
the only thing i can see is a white rectangular shape and i would like it to be as big as a black label underneath (size of (55,5) )with the actual image appearing...
can anyone help me with this problem?
You might have thought that my English is not that great haha
but please have mercy!

UIScrollView does not work, only one image is displayed

I am trying to create a UIScrollView - but it doesnt work. I only see one image in the view - swipe1. The scroll view does scroll forward but its blank and I dont see the other 2 images.
def create_image_scroll_view_NICE
#scroll_view = UIScrollView.alloc.initWithFrame self.view.bounds
#scroll_view.delegate = self
#scroll_view.scrollsToTop = false
self.view.addSubview #scroll_view
#scroll_view.pagingEnabled = true
#scroll_view.showsHorizontalScrollIndicator = false
#scroll_view.contentSize = CGSizeMake(NUMBER_OF_PAGES * self.view.frame.size.width, self.view.frame.size.height)
#delivery_image = UIImageView.alloc.initWithImage(UIImage.imageNamed("swipe3"))
#scroll_view.addSubview #delivery_image
#notification_image = UIImageView.alloc.initWithImage(UIImage.imageNamed("swipe2"))
#scroll_view.addSubview #notification_image
#box_image = UIImageView.alloc.initWithImage(UIImage.imageNamed("swipe1"))
#scroll_view.addSubview #box_image
end
because three images frame are same .
you need to set frame like this:
delivery_image.frame = CGRectMake(0,0,width,height);
notification_image.frame = CGRectMake(self.view.frame.size.width,0,width,height);
box_image.frame = CGRectMake(self.view.frame.size.width*2,0,width,height);
All of your imageView's are going to have an origin of [0, 0] so they will all overlap.
What you need to do is offset the frame of each image so it appears next to the previous image
%w(swipe3 swipe2 swipe1).each_with_index do |image_name, index|
delivery_image = UIImageView.alloc.initWithImage(UIImage.imageNamed(image_name))
x_offset = CGRectGetWidth(self.view.frame) * index
delivery_image.frame = [[ x_offset, 0], delivery_image.frame.size ]
#scroll_view.addSubview delivery_image
end

Resources